Skip to content

Commit cb608b9

Browse files
committed
ci: check for dirty repository after tests
1 parent 75de69c commit cb608b9

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
- name: rustdoc
4444
run: make doc
4545

46+
- run: make is-dirty
47+
4648
wasm:
4749
runs-on: ubuntu-latest
4850

@@ -63,6 +65,8 @@ jobs:
6365
- name: Run tests in wasm
6466
run: RUSTFLAGS='-Dwarnings --cfg getrandom_backend="wasm_js"' make wasm
6567

68+
- run: make is-dirty
69+
6670
run_tests_with_network:
6771
runs-on: ubuntu-latest
6872
env:

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ doc: ## Generate documentation
4444
doc-open: ## Generate and open documentation
4545
RUSTDOCFLAGS="--cfg=doc_cfg -Zunstable-options --generate-link-to-definition" RUSTC_BOOTSTRAP=1 cargo doc --all-features --no-deps --open
4646

47+
.PHONY: is-dirty
48+
is-dirty: ## Checks if repository is dirty
49+
@(test -z "$$(git diff)" || (git diff && false)) && (test -z "$$(git status --porcelain)" || (git status --porcelain && false))
50+
4751
.PHONY: ci
4852
ci: check-features check-fmt test wasm ## Run the full CI process
4953

0 commit comments

Comments
 (0)