Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into lease
Browse files Browse the repository at this point in the history
  • Loading branch information
sourcefrog committed Dec 22, 2024
2 parents 4b1e569 + 74a0473 commit e0d7ef6
Show file tree
Hide file tree
Showing 30 changed files with 1,127 additions and 490 deletions.
43 changes: 12 additions & 31 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,30 +52,25 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
features: ["", "s3"]
version: [stable, nightly, "1.74"]
version: [stable, nightly, "1.79"]

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.version }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.features }}
- name: Show version
run: |
rustup show
cargo --version
rustc --version
- name: Build
run: >
cargo build --all-targets --no-default-features --features=${{
matrix.features }} --features fail/failpoints
cargo build --all-targets --features fail/failpoints
- name: Test
run: >
cargo test --no-default-features --features=${{ matrix.features }}
--features fail/failpoints -- --include-ignored
cargo test --features fail/failpoints -- --include-ignored
# Run rustfmt separately so that it does not block test results
rustfmt:
Expand All @@ -92,7 +87,7 @@ jobs:

# S3 integration tests can't run from CI because they need credentials, but we
# can at least make sure that they compile.
build-large-tests:
build-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -101,22 +96,9 @@ jobs:
toolchain: stable
- uses: swatinem/rust-cache@v2
- name: cargo build
run: cargo build --all-targets --features s3,s3-integration-test
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 -- --deny clippy::all

# Not all features can be run: s3 integration tests require credentials.
# But all of them should compile.
check-all-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -149,8 +131,8 @@ jobs:
tool: cargo-mutants
- name: Mutants in diff
run: >
cargo mutants --no-shuffle -vV --in-diff git.diff --in-place -- --features
fail/failpoints
cargo mutants --no-shuffle -vV --in-diff git.diff --in-place --
--features fail/failpoints
- name: Archive mutants.out
uses: actions/upload-artifact@v4
if: always()
Expand All @@ -165,7 +147,7 @@ jobs:
# We want to see all the missed mutants so don't fail fast.
fail-fast: false
matrix:
shard: [0, 1, 2, 3]
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -181,11 +163,10 @@ jobs:
# Don't use the S3 features because they require AWS credentials for realistic
# testing.
run: |
cargo mutants --no-shuffle -vV --cargo-arg=--no-default-features \
--in-place \
--baseline=skip --shard ${{ matrix.shard }}/4 \
-- \
--features fail/failpoints
cargo mutants --no-shuffle -vV --in-place --baseline=skip \
--shard ${{ matrix.shard }}/10 \
-- \
--features fail/failpoints
- name: Archive results
uses: actions/upload-artifact@v4
if: always()
Expand Down
Loading

0 comments on commit e0d7ef6

Please sign in to comment.