-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (31 loc) · 1.55 KB
/
check-dump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
on:
# this workflow is only called by others, won't be executed on itself
# as it uses the pre-built docker image that is produced in the upstream job
workflow_call:
jobs:
check_dumps:
name: Check if the generated dumps are up to date
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract metadata to env variables
uses: HSLdevcom/jore4-tools/github-actions/extract-metadata@extract-metadata-v1
- name: start e2e env
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v7
with:
hasura_version: '${{ env.IMAGE_NAME }}:generic-${{ env.COMMIT_ID }}'
- name: Generate database dumps
run: ./scripts/generate-dumps.sh
- name: Verify that generate dump command made no changes
run: 'if [ -n "$(git status --porcelain)" ]; then git diff; exit 1; fi'
- name: Remove the hasura container
run: docker rm --force hasura && docker volume prune --force
- name: Restart the hasura container to rerun the repeatable migrations
uses: HSLdevcom/jore4-tools/github-actions/setup-e2e-environment@setup-e2e-environment-v7
with:
hasura_version: '${{ env.IMAGE_NAME }}:generic-${{ env.COMMIT_ID }}'
- name: Generate database dumps again, this time after the repeatable migrations
run: ./scripts/generate-dumps.sh
- name: Verify that generate dump command still made no changes
run: 'if [ -n "$(git status --porcelain)" ]; then git diff; exit 1; fi'