mirror of
https://github.com/openai/codex.git
synced 2026-10-23 18:08:45 +00:00
Ensure the Cargo.lock file is up-to-date in pull request CI
This commit is contained in:
@@ -21,6 +21,8 @@ jobs:
|
||||
- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0
|
||||
with:
|
||||
components: rustfmt
|
||||
- name: Check Cargo.lock is up to date
|
||||
run: cargo metadata --locked --format-version 1 >/dev/null
|
||||
- name: cargo fmt
|
||||
run: cargo fmt -- --config imports_granularity=Item --check
|
||||
|
||||
|
||||
@@ -65,6 +65,8 @@ jobs:
|
||||
- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0
|
||||
with:
|
||||
components: rustfmt
|
||||
- name: Check Cargo.lock is up to date
|
||||
run: cargo metadata --locked --format-version 1 >/dev/null
|
||||
- name: cargo fmt
|
||||
run: cargo fmt -- --config imports_granularity=Item --check
|
||||
|
||||
|
||||
@@ -32,10 +32,10 @@ just bazel-lock-update
|
||||
This runs `bazel mod deps --lockfile_mode=update` and updates `MODULE.bazel.lock` if needed.
|
||||
Commit the lockfile changes along with your Cargo lockfile update.
|
||||
|
||||
To verify lockfile alignment locally (the same check CI runs), use:
|
||||
To verify lockfile alignment locally (the same checks CI runs), use:
|
||||
|
||||
```bash
|
||||
just bazel-lock-check
|
||||
just lock-check
|
||||
```
|
||||
|
||||
In some cases, an upstream crate may need a patch or a `crate.annotation` in `../MODULE.bzl`
|
||||
|
||||
@@ -44,6 +44,11 @@ install:
|
||||
rustup show active-toolchain
|
||||
cargo fetch
|
||||
|
||||
cargo-lock-check:
|
||||
cargo metadata --locked --format-version 1 >/dev/null
|
||||
|
||||
lock-check: cargo-lock-check bazel-lock-check
|
||||
|
||||
# Run `cargo nextest` since it's faster than `cargo test`, though including
|
||||
# --no-fail-fast is important to ensure all tests are run.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user