Обновить .gitea/workflows/flyway-migrate.yaml
Database Migration and Test / migrate-and-test (push) Failing after 28s

This commit is contained in:
2025-12-08 22:33:06 +03:00
parent e8fdb87e03
commit bb035f0005
+13 -18
View File
@@ -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;"'
"