diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml deleted file mode 100644 index eb466ef3..00000000 --- a/.github/workflows/actionlint.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: actionlint - -on: - pull_request: - paths: - - ".github/workflows/*.yml" - push: - branches: - - main - paths: - - ".github/workflows/*.yml" - workflow_dispatch: - -permissions: - contents: read - pull-requests: write - -jobs: - action-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Check workflow files - shell: bash - run: | - bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) - # shellcheck disable=SC2046 - ./actionlint -color $(find .github/workflows -name '*.yml' -type f ! -name release.yml -print) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index efc97821..a1d06366 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,9 +26,22 @@ env: # TODO: Add -D warnings when that's clean on Windows. jobs: + # Check this file seems clean before launching anything else. + action-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check workflow files + shell: bash + run: | + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) + # shellcheck disable=SC2046 + ./actionlint -color $(find .github/workflows -name '*.yml' -type f ! -name release.yml -print) + # Run tests just on Ubuntu to establish that things basically work, # before launching mutants etc quick-test: + needs: [action-lint] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -44,6 +57,17 @@ jobs: - name: Test run: > cargo test --features fail/failpoints + # S3 integration tests can't run from CI because they need credentials, but we + # can at least make sure that they compile. + - name: cargo build --all-targets --all-features + run: cargo build --all-targets --all-features + - name: rustfmt check + run: cargo fmt --all -- --check + - name: clippy + run: cargo clippy --all-targets --all-features -- --deny clippy::all + - run: cargo check --no-default-features --all-targets + - name: typos + uses: crate-ci/typos@master tests: needs: [quick-test] @@ -80,43 +104,6 @@ jobs: # when executing the mounting tests on Windows due to projfs. RUST_TEST_THREADS: 1 - # Run rustfmt separately so that it does not block test results - rustfmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - components: rustfmt - - uses: Swatinem/rust-cache@v2 - - name: rustfmt check - run: cargo fmt --all -- --check - - # S3 integration tests can't run from CI because they need credentials, but we - # can at least make sure that they compile. - build-all-features: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - uses: swatinem/rust-cache@v2 - - name: cargo build - run: cargo build --all-targets --all-features - - clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - uses: swatinem/rust-cache@v2 - - name: clippy - run: cargo clippy --all-targets --all-features -- --deny clippy::all - pr-mutants: runs-on: ubuntu-latest if: github.event_name == 'pull_request' @@ -139,7 +126,8 @@ jobs: tool: cargo-mutants - name: Mutants in diff run: > - cargo mutants --no-shuffle -vV --in-diff git.diff --in-place -- + cargo mutants --no-shuffle -vV --in-diff git.diff --in-place + --no-default-features --features fail/failpoints - name: Archive mutants.out uses: actions/upload-artifact@v4 @@ -170,10 +158,10 @@ jobs: - name: Run mutant tests # Don't use the S3 features because they require AWS credentials for realistic # testing. - run: | - cargo mutants --no-shuffle -vV --in-place --baseline=skip \ - --shard ${{ matrix.shard }}/10 \ - -- \ + run: > + cargo mutants --no-shuffle -vV --in-place --baseline=skip + --shard ${{ matrix.shard }}/10 + --no-default-features --features fail/failpoints - name: Archive results uses: actions/upload-artifact@v4 diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml deleted file mode 100644 index 60f84ec7..00000000 --- a/.github/workflows/typos.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Typos -on: [pull_request] - -jobs: - run: - name: Spell check with Typos - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Check spelling - uses: crate-ci/typos@master