fix(ci): types drift gate fails closed on a git error and sees untracked files whatever the git config
The ci.yml step assigns git status to a variable before testing it (a git failure now fails the step, as scripts/check-all.sh already did); both gates pass --untracked-files=all; the rust-check.sh comment names the real gate.
This commit is contained in:
1 parent
073b25e52b
commit
496f54990a
4 files changed
+10
-7
No files matched your search
@@ -16,7 +16,7 @@ stage() {
|
||||
stage "rust: fmt, clippy, tests, ts-rs export, cargo-deny (native toolchain)"
|
||||
bash scripts/rust-check.sh
|
||||
stage "rust: committed TypeScript types match the Rust contracts (no modified or new file)"
|
||||
drift="$(git status --porcelain -- packages/core-wasm/types)"
|
||||
drift="$(git status --porcelain --untracked-files=all -- packages/core-wasm/types)"
|
||||
if [ -n "$drift" ]; then
|
||||
echo "packages/core-wasm/types differs from the committed types:" >&2
|
||||
echo "$drift" >&2
|
||||
|
||||
@@ -16,8 +16,8 @@ cargo fmt --all --check
|
||||
cargo clippy --workspace --all-targets --locked -- -D warnings
|
||||
cargo test --workspace --locked
|
||||
# Exports the TypeScript types of the contracts (ts-rs) into packages/core-wasm/types.
|
||||
# `git diff --exit-code -- packages/core-wasm/types` must stay empty afterwards
|
||||
# (scripts/check-all.sh, .gitea/workflows/ci.yml): the committed types never drift from
|
||||
# the Rust structs.
|
||||
# `git status --porcelain --untracked-files=all -- packages/core-wasm/types` must stay
|
||||
# empty afterwards (scripts/check-all.sh, .gitea/workflows/ci.yml): the committed types
|
||||
# never drift from the Rust structs, and a new type file counts as drift.
|
||||
cargo test -p faunosteo-core --features ts --locked
|
||||
cargo deny check licenses bans sources
|
||||
Reference in new issue
Block a user