2021-09-30 12:39:48 +00:00
|
|
|
name: Docker Build
|
|
|
|
|
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
concise_migration_diff:
|
|
|
|
name: Verify concise migration and generated schema
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run docker concise migration build
|
|
|
|
run: make docker-concise-migration-build
|
|
|
|
- name: Run database
|
|
|
|
run: docker-compose -f docker-compose.test.yml up -d test-db
|
|
|
|
- name: Test concise migration
|
|
|
|
run: |
|
|
|
|
sleep 10
|
|
|
|
docker run --rm --network host -e DATABASE_USER=vdbm -e DATABASE_PASSWORD=password \
|
|
|
|
-e DATABASE_HOSTNAME=127.0.0.1 -e DATABASE_PORT=8066 -e DATABASE_NAME=vulcanize_testing \
|
2021-10-05 11:17:45 +00:00
|
|
|
vulcanize/concise-migration-build
|
2021-09-30 12:39:48 +00:00
|
|
|
- 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
|
|
|
|
incremental_migration_diff:
|
|
|
|
name: Compare conscise migration schema with incremental migration.
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-10-08 13:25:49 +00:00
|
|
|
- uses: actions/checkout@v2
|
2021-09-30 12:39:48 +00:00
|
|
|
- name: Run database
|
|
|
|
run: docker-compose -f docker-compose.test.yml up -d test-db statediff-migrations
|
|
|
|
- name: Test incremental migration
|
|
|
|
run: |
|
|
|
|
sleep 10
|
|
|
|
docker run --rm --network host -e DATABASE_USER=vdbm -e DATABASE_PASSWORD=password \
|
|
|
|
-e DATABASE_HOSTNAME=127.0.0.1 -e DATABASE_PORT=8066 -e DATABASE_NAME=vulcanize_testing \
|
2021-10-08 13:03:37 +00:00
|
|
|
vulcanize/statediff-migrations:v0.9.0
|
2021-09-30 12:39:48 +00:00
|
|
|
- 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
|