Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require Cargo.lock matches Cargo.toml in CI #19938

Merged
merged 2 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
TMPDIR: ${{ runner.temp }}
if: needs.classify_changes.outputs.rust == 'true'
name: Test Rust
run: ./cargo test --tests -- --nocapture --test-threads=8
run: ./cargo test --locked --tests -- --nocapture --test-threads=8
timeout-minutes: 60
bootstrap_pants_linux_x86_64:
env:
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:

./build-support/bin/check_rust_pre_commit.sh

./cargo test --all --tests -- --nocapture
./cargo test --locked --all --tests -- --nocapture

./cargo check --benches

Expand Down Expand Up @@ -294,7 +294,7 @@ jobs:
TMPDIR: ${{ runner.temp }}
if: needs.classify_changes.outputs.rust == 'true'
name: Test Rust
run: ./cargo test --tests -- --nocapture
run: ./cargo test --locked --tests -- --nocapture
timeout-minutes: 60
build_wheels_linux_arm64:
container:
Expand Down
4 changes: 2 additions & 2 deletions build-support/bin/check_rust_pre_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ source build-support/common.sh

if is_macos_arm; then
echo "* Running \`./cargo clippy\`"
./cargo clippy || exit 1
./cargo clippy --locked || exit 1
else
echo "* Running \`./cargo clippy --all\`"
./cargo clippy --all || exit 1
./cargo clippy --locked --all || exit 1
fi

echo "* Checking formatting of Rust files"
Expand Down
4 changes: 2 additions & 2 deletions src/python/pants_release/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def bootstrap_jobs(
# invalid doc tests in their comments. We do not pass --all as BRFS tests don't
# pass on GHA MacOS containers.
step_cmd = helper.wrap_cmd(
helper.maybe_append_cargo_test_parallelism("./cargo test --tests -- --nocapture")
helper.maybe_append_cargo_test_parallelism("./cargo test --locked --tests -- --nocapture")
)
elif rust_testing == RustTesting.ALL:
human_readable_job_name += ", test and lint Rust"
Expand All @@ -623,7 +623,7 @@ def bootstrap_jobs(
[
"./build-support/bin/check_rust_pre_commit.sh",
helper.maybe_append_cargo_test_parallelism(
"./cargo test --all --tests -- --nocapture"
"./cargo test --locked --all --tests -- --nocapture"
),
"./cargo check --benches",
"./cargo doc",
Expand Down
Loading