Skip to content

Commit 919834e

Browse files
committed
ci: require new fixtures be committed
1 parent 707e33c commit 919834e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ jobs:
9595
name: Test Programs
9696
runs-on: ubuntu-latest
9797
needs: format_and_lint_programs
98+
env:
99+
EJECT_FUZZ_FIXTURES_FD: "fuzz/blob"
100+
EJECT_FUZZ_FIXTURES_JSON_FD: "fuzz/json"
98101
steps:
99102
- name: Git Checkout
100103
uses: actions/checkout@v4
@@ -106,8 +109,20 @@ jobs:
106109
cargo-cache-fallback-key: cargo-programs
107110
solana: true
108111

112+
- name: Clear Fixtures
113+
run: rm -rf program/fuzz
114+
109115
- name: Test Programs
110116
run: pnpm programs:test
117+
118+
- name: Check Working Directory
119+
run: |
120+
if [ -n "$(git status --porcelain)" ]; then
121+
test -z "$(git status --porcelain)"
122+
echo "Generated test fixtures have changed. Please set the `EJECT_FUZZ_FIXTURES_FD` and `EJECT_FUZZ_FIXTURES_JSON_FD`, \
123+
remove the existing fixtures, run the tests, and commit the updated fixtures.";
124+
exit 1;
125+
fi
111126
112127
bench_program_compute_units:
113128
name: Benchmark Program Compute Units

0 commit comments

Comments
 (0)