diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml deleted file mode 100644 index 51b9666..0000000 --- a/.github/workflows/clippy.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Clippy check -on: - push: - branches: - - "**" - pull_request: - branches: - - "rolling" - -jobs: - clippy_check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: rustup component add clippy - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-targets --all-features -- -D warnings diff --git a/.github/workflows/rust_format.yml b/.github/workflows/rust_format.yml new file mode 100644 index 0000000..d865c8c --- /dev/null +++ b/.github/workflows/rust_format.yml @@ -0,0 +1,26 @@ +name: Rust format and clippy checks +on: + push: + branches: + - "**" + pull_request: + branches: + - "rolling" + +jobs: + check: + name: Rust project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install minimal stable with clippy and rustfmt + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt, clippy + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml deleted file mode 100644 index 3d43305..0000000 --- a/.github/workflows/rustfmt.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Rustfmt -on: - push: - branches: - - "**" - pull_request: - branches: - - "rolling" - -jobs: - formatting: - name: cargo fmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - # Ensure rustfmt is installed and setup problem matcher - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: rustfmt - - name: Rustfmt Check - uses: Syndelis/rustfmt-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }}