Skip to content

Commit

Permalink
Run Sequelize
Browse files Browse the repository at this point in the history
  • Loading branch information
john-craft committed Oct 24, 2023
1 parent 704d1e8 commit 6399614
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/test-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
env:
GCP_PROEJCT_ID: "database-migration-anonymized"
DB_HOST: "users-db"
POSTGRES_PASSWORD: ${DB_PASSWORD:-dMVZFeBWLOzYRV71}
POSTGRES_DB: "postgres"

steps:
- name: Checkout code
Expand All @@ -36,9 +38,6 @@ jobs:
docker pull gcr.io/$GCP_PROEJCT_ID/$DB_HOST:latest
- name: Start PostgreSQL container
env:
POSTGRES_PASSWORD: ${DB_PASSWORD:-dMVZFeBWLOzYRV71}
POSTGRES_DB: "postgres"
run: |
docker run -d --name $DB_HOST -e POSTGRES_PASSWORD=$DB_PASSWORD: -e POSTGRES_DB=$POSTGRES_DB -p 5432:5432 gcr.io/$GCP_PROEJCT_ID/$DB_HOST:latest
Expand All @@ -55,9 +54,11 @@ jobs:
sleep 10
done
# - name: Run Sequelize migrations
# run: |
# npx sequelize-cli db:migrate --config path-to-your-sequelize-config
- name: Run Sequelize migrations
env:
DATABASE_URL: postgres://$DB_USERNAME:$POSTGRES_PASSWORD@$DB_HOST:5432/$POSTGRES_DB
run: |
npx sequelize-cli db:migrate
- name: Cleanup
run: docker stop $DB_HOST

0 comments on commit 6399614

Please sign in to comment.