Compare Up and Down Migration.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user