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