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

This commit is contained in:
2025-12-08 22:52:45 +03:00
parent b17b633cd9
commit 5556d9ad7d
+21 -3
View File
@@ -9,12 +9,22 @@ jobs:
- name: Check out repository code
uses: actions/checkout@v3
# Необязательно, но полезно для отладки секретов
- name: Debug env
run: |
echo "DB_HOST=${{ secrets.DB_HOST }}"
echo "DB_PORT=${{ secrets.DB_PORT }}"
- name: Create test database
uses: docker://alpine/psql:latest
with:
args: >
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 "CREATE DATABASE testdb;"'
@@ -34,7 +44,11 @@ jobs:
with:
args: >
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;"'
- name: Drop test database
@@ -43,5 +57,9 @@ jobs:
with:
args: >
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;"'