Skip to content

Commit 2a930ff

Browse files
committed
add test for test_data.json diff
When adding migrations and adding or modifying fields one might forget to change test_data.json. This test aims to check if that happend by making a new test_data.json and comparing it.
1 parent e1cffa7 commit 2a930ff

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/tests.yml

+17
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,23 @@ jobs:
3939
- name: Run tests
4040
run: python manage.py test --shuffle
4141

42+
test_testdata:
43+
name: Test if testdata is up to date
44+
45+
runs-on: ubuntu-22.04
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: ./.github/setup_evap
50+
with:
51+
start-db: true
52+
- name: Create new test_data.json
53+
run: |
54+
python manage.py reload_testdata --noinput
55+
python manage.py dump_testdata
56+
- name: Check if test_data.json changed
57+
run: git diff --exit-code
58+
4259
mypy:
4360
runs-on: ubuntu-22.04
4461

0 commit comments

Comments
 (0)