Skip to content

Commit

Permalink
Fix instructions for setting up github actions (#576)
Browse files Browse the repository at this point in the history
* Fix instructions for setting up github actions

* Fix whitespace
  • Loading branch information
stwiname authored Dec 10, 2024
1 parent 0c04433 commit ae8c9a7
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions docs/indexer/build/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,19 +213,41 @@ jobs:
pr:
name: 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@v2
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- run: yarn
- name: Codegen
run: yarn codegen
- name: Build
run: yarn build
- name: Install subql-node
run: yarn global add @subql/node

- 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: Run tests
run: subql-node test -f ${{ github.workspace }}
```
Expand Down

0 comments on commit ae8c9a7

Please sign in to comment.