File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848 ~/.cargo/registry
4949 ~/.cargo/git
5050 target
51- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
51+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
52+
53+ - name : Validate lockfile
54+ run : |
55+ cp Cargo.lock Cargo.lock.bak
56+ cargo generate-lockfile
57+ if ! diff -q Cargo.lock Cargo.lock.bak >/dev/null; then
58+ echo "::error::Cargo.lock is out of sync. Run 'cargo update' or 'rm Cargo.lock && cargo build' locally and commit the updated Cargo.lock."
59+ exit 1
60+ fi
61+ rm Cargo.lock.bak
5262
5363 - name : Check formatting
5464 run : cargo fmt --all -- --check
7888 ~/.cargo/registry
7989 ~/.cargo/git
8090 target
81- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
91+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
92+
93+ - name : Validate lockfile
94+ run : |
95+ cp Cargo.lock Cargo.lock.bak
96+ cargo generate-lockfile
97+ if ! diff -q Cargo.lock Cargo.lock.bak >/dev/null; then
98+ echo "::error::Cargo.lock is out of sync. Run 'cargo update' or 'rm Cargo.lock && cargo build' locally and commit the updated Cargo.lock."
99+ exit 1
100+ fi
101+ rm Cargo.lock.bak
82102
83103 - name : Run all workspace tests
84104 run : cargo test --workspace
You can’t perform that action at this time.
0 commit comments