Skip to content

Commit

Permalink
chore: Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchalifoux committed May 10, 2024
1 parent 7793c11 commit 5077da8
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 40 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build and Test

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
19 changes: 19 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Create Release

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
release-type: rust
23 changes: 6 additions & 17 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/

name: rust-clippy analyze
name: Cargo Clippy

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
branches: ["main"]
schedule:
- cron: '27 20 * * 0'
- cron: "27 20 * * 0"

jobs:
rust-clippy-analyze:
Expand All @@ -28,7 +18,7 @@ jobs:
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
Expand All @@ -42,8 +32,7 @@ jobs:
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
run:
cargo clippy
run: cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/rust.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Upload Binary

permissions:
contents: write
Expand Down

0 comments on commit 5077da8

Please sign in to comment.