mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
ci: error when cargo test
makes git status dirty (#29429)
This commit is contained in:
parent
ff078dcfab
commit
c6c6be328f
3 changed files with 20 additions and 0 deletions
16
.github/workflows/ci.generate.ts
vendored
16
.github/workflows/ci.generate.ts
vendored
|
@ -998,6 +998,22 @@ const ci = {
|
||||||
].join("\n"),
|
].join("\n"),
|
||||||
run: "cargo test --release --locked --features=panic-trace",
|
run: "cargo test --release --locked --features=panic-trace",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Ensure no git changes",
|
||||||
|
if: "matrix.job == 'test'",
|
||||||
|
run: [
|
||||||
|
'if [[ -n "$(git status --porcelain)" ]]; then',
|
||||||
|
'echo "🧾 Diff:"',
|
||||||
|
"git diff",
|
||||||
|
'echo "❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files."',
|
||||||
|
'echo ""',
|
||||||
|
'echo "📋 Status:"',
|
||||||
|
"git status",
|
||||||
|
'echo ""',
|
||||||
|
"exit 1",
|
||||||
|
"fi",
|
||||||
|
].join("\n"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Configure hosts file for WPT",
|
name: "Configure hosts file for WPT",
|
||||||
if: "matrix.wpt",
|
if: "matrix.wpt",
|
||||||
|
|
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -614,6 +614,9 @@ jobs:
|
||||||
github.repository == 'denoland/deno' &&
|
github.repository == 'denoland/deno' &&
|
||||||
!startsWith(github.ref, 'refs/tags/'))))
|
!startsWith(github.ref, 'refs/tags/'))))
|
||||||
run: cargo test --release --locked --features=panic-trace
|
run: cargo test --release --locked --features=panic-trace
|
||||||
|
- name: Ensure no git changes
|
||||||
|
if: '!(matrix.skip) && (matrix.job == ''test'')'
|
||||||
|
run: "if [[ -n \"$(git status --porcelain)\" ]]; then\necho \"\U0001F9FE Diff:\"\ngit diff\necho \"❌ Git working directory is dirty. Ensure `cargo test` is not modifying git tracked files.\"\necho \"\"\necho \"\U0001F4CB Status:\"\ngit status\necho \"\"\nexit 1\nfi"
|
||||||
- name: Configure hosts file for WPT
|
- name: Configure hosts file for WPT
|
||||||
if: '!(matrix.skip) && (matrix.wpt)'
|
if: '!(matrix.skip) && (matrix.wpt)'
|
||||||
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
|
run: ./wpt make-hosts-file | sudo tee -a /etc/hosts
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,6 +1,7 @@
|
||||||
*.orig
|
*.orig
|
||||||
*.pyc
|
*.pyc
|
||||||
*.swp
|
*.swp
|
||||||
|
*.symcache
|
||||||
.env
|
.env
|
||||||
|
|
||||||
/.cargo_home/
|
/.cargo_home/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue