-
Notifications
You must be signed in to change notification settings - Fork 17
33 lines (31 loc) · 1.08 KB
/
migrations.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
name: Reminder to update seed data after migration
# If this workflow fails, it is a hint that you forgot to update the seed data after a migration.
# It is only a hint, because it only checks if you updated the migration collection in the seed data.
# It is not a check that you updated the whole seed data correctly.
# See the documentation for advice: https://documentation.dbildungscloud.dev/docs/schulcloud-server/Migrations#committing-a-migration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
MONGODB_VERSION: 6.0
NODE_VERSION: '20'
jobs:
migration:
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: mongodb setup
uses: supercharge/[email protected]
- name: setup
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm ci
- run: npm run setup:db:seed
- name: check no pending migrations (migration is in db)
run: test $(npm run migration:pending | grep -c "Migration") -eq 0