-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #146 from GMOD/145-testing-flyway-with-tripal
Automated testing for applying migrations in a named schema
- Loading branch information
Showing
3 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
.github/workflows/ALL-testMigrate.yml → .github/workflows/ALL-testMigratePublic.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "Testing Flyway Migrations: Named Schema Teacup" | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
pgsql-version: | ||
- "12" | ||
- "13" | ||
- "14" | ||
- "15" | ||
- "16" | ||
steps: | ||
# Check out the repo | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
# Here we fully build a docker using the current checked out code | ||
# to ensure we test the current migrations. | ||
- name: Build Docker Image | ||
run: | | ||
docker build --tag gmod/chado:local \ | ||
--file docker/Dockerfile \ | ||
--build-arg PGSQL_VERSION="${{ matrix.pgsql-version }}" \ | ||
--build-arg SCHEMA_NAME="teacup" \ | ||
--build-arg APPLY_MIGRATIONS=0 ./ | ||
# Just spin up docker the good ol' fashion way | ||
# then run flyway baseline and migrate. | ||
- name: Run Flyway Migrate | ||
run: | | ||
docker run --name=chadodocker -tid gmod/chado:local | ||
sleep 30 | ||
docker exec chadodocker flyway migrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters