Skip to content

Commit

Permalink
ci: postgres service
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Dec 10, 2024
1 parent 47e290f commit 43a967e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ on:
jobs:
pr:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DB_USER: postgres
DB_PASS: postgres
DB_DATABASE: postgres
DB_HOST: localhost
DB_PORT: 5432
steps:
- uses: actions/checkout@v4
# Before setup-node because that action runs `yarn cache dir`. See https://github.com/actions/setup-node/issues/480#issuecomment-1915448139
Expand All @@ -24,6 +42,8 @@ jobs:
- name: Build
run: yarn build
# TODO: https://github.com/Agoric/agoric-subql/issues/8
- name: Enable btree btree_gist
run: psql "postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_DATABASE" -c "CREATE EXTENSION IF NOT EXISTS btree_gist;"
# - name: Install subql-node-cosmos
# run: yarn global add @subql/node-cosmos
# - name: Run tests with Subquery Node
Expand Down

0 comments on commit 43a967e

Please sign in to comment.