Skip to content

Commit

Permalink
chore: don't include dev-dependencies in MSRV builds at all
Browse files Browse the repository at this point in the history
This commit removes the `--tests` from the MSRV build's `cargo check`
invocation. This way, CI will not try to compile dev dependencies on the
MSRV. This is fine, because the tests not building on 1.42.0 won't stop
1.42.0 users from depending on `tracing` crates.

Unfortunately, this means we have to remove the CI job that runs tests
on 1.42.0. But, a significant change in the behavior we're testing for
on our MSRV vs on stable seems unlikely.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
  • Loading branch information
hawkw committed Aug 17, 2021
1 parent 7279cf0 commit 1b8fce9
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
check-msrv:
# Run `cargo check` on our minimum supported Rust version (1.42.0).
runs-on: ubuntu-latest
rust: 1.42.0
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
Expand All @@ -22,12 +21,11 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: check
args: --all --bins --tests
args: --all --bins

check:
# Run `cargo check` first to ensure that the pushed code at least compiles.
runs-on: ubuntu-latest
rust: stable
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
Expand Down Expand Up @@ -143,32 +141,6 @@ jobs:
command: test
args: --all

test-msrv:
# Test against the minimum supported Rust version
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.42.0
profile: minimal
override: true
# We can't use `cargo test --all`, as that will also compile the examples.
# We don't guarantee the examples will work on the MSRV, because they have
# external dependencies which may not comply with our MSRV policy, but don't
# actually impact users on our MSRV.
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --lib --tests
- name: Run doctests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --doc

test-build-wasm:
needs: check
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1b8fce9

Please sign in to comment.