Compare Up and Down Migration.

This commit is contained in:
Arijit Das
2021-10-13 13:09:58 +05:30
parent 0174b9f978
commit a8ad027698
6 changed files with 101 additions and 7 deletions
+24 -2
View File
@@ -21,7 +21,8 @@ jobs:
- name: Verify schema is latest
run: |
PGPASSWORD="password" pg_dump -h localhost -p 8066 -U vdbm vulcanize_testing --no-owner --schema-only > ./db/migration_schema.sql
./scripts/check_diff.sh
./scripts/check_diff.sh ./db/migration_schema.sql db/schema.sql
incremental_migration_diff:
name: Compare conscise migration schema with incremental migration.
runs-on: ubuntu-latest
@@ -38,4 +39,25 @@ jobs:
- name: Verify schema is latest
run: |
PGPASSWORD="password" pg_dump -h localhost -p 8066 -U vdbm vulcanize_testing --no-owner --schema-only > ./db/migration_schema.sql
./scripts/check_diff.sh
./scripts/check_diff.sh db/schema.sql ./db/migration_schema.sql
migration:
name: Compare up and down migration
env:
GOPATH: /tmp/go
strategy:
matrix:
go-version: [ 1.16.x ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- name: Create GOPATH
run: mkdir -p /tmp/go
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
- name: Test migration
run: |
timeout 5m make test-migrations