diff --git a/.github/workflows/rust-fmt.yml b/.github/workflows/rust-fmt.yml deleted file mode 100644 index d5ff0b8..0000000 --- a/.github/workflows/rust-fmt.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: pull_request - -name: Rustfmt - -jobs: - format: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - with: - components: rustfmt - - uses: mbrobbel/rustfmt-check@master - with: - token: ${{ secrets.GITHUB_TOKEN }} - mode: review diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8cd8d8e..1d76b7e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,17 +13,39 @@ env: RUSTFLAGS: "-Dwarnings" jobs: + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Install Rust nightly toolchain with clippy + uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt + - name: Run Rustfmt + run: cargo fmt -- --check + clippy: + name: Clippy + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Install Rust nightly toolchain with clippy + uses: dtolnay/rust-toolchain@nightly + with: + components: clippy + - name: Run Clippy + run: cargo clippy --all-targets --all-features build: - + name: Rust Build & Test runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Run Clippy - run: cargo clippy --all-targets --all-features - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose - - name: Run tests (rootful) - run: sudo -E env "PATH=$PATH" bash tests/run_nft_tests.sh + - name: Checkout repo + uses: actions/checkout@v4 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + - name: Run tests (rootful) + run: sudo -E env "PATH=$PATH" bash tests/run_nft_tests.sh