Skip to content

Commit 392da15

Browse files
committed
fix: Always execute populate table with test records
1 parent f2fb25a commit 392da15

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

.github/workflows/cd-base.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -127,24 +127,7 @@ jobs:
127127
echo "public_ip=$(terraform output -raw db_host)" >> $GITHUB_OUTPUT
128128
echo "api_url=$(terraform output -raw cloud_run_service_url)" >> $GITHUB_OUTPUT
129129
130-
- name: Check if tickets table exists
131-
id: check_table
132-
env:
133-
PGPASSWORD: ${{ secrets.DB_PASSWORD }}
134-
run: |
135-
# install postgres client
136-
sudo apt-get update && sudo apt-get install -y postgresql-client
137-
138-
TABLE_EXISTS=$(psql -h ${{ steps.db.outputs.public_ip }} \
139-
-U ${{ secrets.DB_USER }} \
140-
-d ${{ secrets.DB_NAME }} \
141-
-tAc "SELECT EXISTS (SELECT FROM pg_tables WHERE tablename = 'tickets');" \
142-
)
143-
144-
echo "table_exist=$TABLE_EXISTS" >> $GITHUB_OUTPUT
145-
146-
- name: Create tables and populate (tickets table not existent)
147-
if: steps.check_table.outputs.table_exist == 'f'
130+
- name: Populate table with test records
148131
env:
149132
PGPASSWORD: ${{ secrets.DB_PASSWORD }}
150133
run: |
@@ -159,10 +142,6 @@ jobs:
159142
-v DB_NAME=${{ secrets.DB_NAME }} \
160143
-v ON_ERROR_STOP=1
161144
done
162-
163-
- name: Skipped table creation (existent tickets table)
164-
if: steps.check_table.outputs.table_exist == 't'
165-
run: echo ""
166145
167146
run-integration-tests:
168147
needs: deploy

0 commit comments

Comments
 (0)