File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,6 +113,15 @@ jobs:
113113 rm -rf .testdata
114114 find . -type d -name "__pycache__" -prune -exec rm -rf {} +
115115
116+ - name : Snapshot regression test data before tests
117+ shell : bash
118+ run : |
119+ if [ -d .testdata ]; then
120+ find .testdata -type f -exec sha256sum {} \; | sort > testdata.before.sha256
121+ else
122+ touch testdata.before.sha256
123+ fi
124+
116125 - name : Run fast regression tests (per system)
117126 run : |
118127 python -m pytest tests/regression \
@@ -123,13 +132,31 @@ jobs:
123132 -vv \
124133 --durations=20
125134
135+ - name : Snapshot regression test data after tests
136+ if : always()
137+ shell : bash
138+ run : |
139+ if [ -d .testdata ]; then
140+ find .testdata -type f -exec sha256sum {} \; | sort > testdata.after.sha256
141+ else
142+ touch testdata.after.sha256
143+ fi
144+
145+ - name : Check regression test data did not change
146+ if : always()
147+ shell : bash
148+ run : |
149+ diff -u testdata.before.sha256 testdata.after.sha256
150+
126151 - name : Upload artifacts (failure)
127152 if : failure()
128153 uses : actions/upload-artifact@v4
129154 with :
130155 name : quick-regression-failure-${{ matrix.system }}
131156 path : |
132157 .testdata/**
158+ testdata.before.sha256
159+ testdata.after.sha256
133160 /tmp/pytest-of-*/pytest-*/**
134161
135162 docs :
You can’t perform that action at this time.
0 commit comments