Обновить .gitea/workflows/flyway-migrate.yaml
Database Migration and Test / migrate-and-test (push) Failing after 28s
Database Migration and Test / migrate-and-test (push) Failing after 28s
This commit is contained in:
@@ -12,12 +12,11 @@ jobs:
|
||||
- name: Create test database
|
||||
uses: docker://postgres:alpine
|
||||
with:
|
||||
args: sh -c "
|
||||
export PGPASSWORD='${{ secrets.DB_PASSWORD }}' &&
|
||||
psql -h ${{ secrets.DB_HOST }} -p ${{ secrets.DB_PORT }} -U ${{ secrets.DB_USER }} -d postgres \
|
||||
-c \'DROP DATABASE IF EXISTS testdb;\' \
|
||||
-c \'CREATE DATABASE testdb;\'
|
||||
"
|
||||
args: >
|
||||
sh -c 'export PGPASSWORD=${{ secrets.DB_PASSWORD }} &&
|
||||
psql -h ${{ secrets.DB_HOST }} -p ${{ secrets.DB_PORT }} -U ${{ secrets.DB_USER }} -d postgres
|
||||
-c "DROP DATABASE IF EXISTS testdb;"
|
||||
-c "CREATE DATABASE testdb;"'
|
||||
|
||||
- name: Run Flyway Migrate
|
||||
uses: docker://flyway/flyway:10
|
||||
@@ -29,24 +28,20 @@ jobs:
|
||||
-locations=filesystem:./sql
|
||||
-baselineOnMigrate=true
|
||||
migrate
|
||||
env:
|
||||
FLYWAY_CLEAN_DISABLED: false
|
||||
|
||||
- name: Run Validation Test (SELECT COUNT)
|
||||
uses: docker://postgres:alpine
|
||||
with:
|
||||
args: sh -c "
|
||||
export PGPASSWORD='${{ secrets.DB_PASSWORD }}' &&
|
||||
psql -h ${{ secrets.DB_HOST }} -p ${{ secrets.DB_PORT }} -U ${{ secrets.DB_USER }} -d testdb \
|
||||
-c 'SELECT COUNT(*) FROM users;'
|
||||
"
|
||||
args: >
|
||||
sh -c 'export PGPASSWORD=${{ secrets.DB_PASSWORD }} &&
|
||||
psql -h ${{ secrets.DB_HOST }} -p ${{ secrets.DB_PORT }} -U ${{ secrets.DB_USER }} -d testdb
|
||||
-c "SELECT COUNT(*) FROM users;"'
|
||||
|
||||
- name: Drop test database
|
||||
if: always()
|
||||
uses: docker://postgres:alpine
|
||||
with:
|
||||
args: sh -c "
|
||||
export PGPASSWORD='${{ secrets.DB_PASSWORD }}' &&
|
||||
psql -h ${{ secrets.DB_HOST }} -p ${{ secrets.DB_PORT }} -U ${{ secrets.DB_USER }} -d postgres \
|
||||
-c \"DROP DATABASE IF EXISTS testdb;\"
|
||||
"
|
||||
args: >
|
||||
sh -c 'export PGPASSWORD=${{ secrets.DB_PASSWORD }} &&
|
||||
psql -h ${{ secrets.DB_HOST }} -p ${{ secrets.DB_PORT }} -U ${{ secrets.DB_USER }} -d postgres
|
||||
-c "DROP DATABASE IF EXISTS testdb;"'
|
||||
|
||||
Reference in New Issue
Block a user