Lock docker image used in the production #111
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | |
on: | |
pull_request: | |
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 | |
- run: corepack enable | |
shell: bash | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: yarn | |
- run: yarn install | |
- run: yarn prettier:check | |
- name: Codegen | |
run: yarn codegen | |
# After codegen because that makes src/types/ | |
- run: yarn tsc | |
- 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 | |
# run: subql-node-cosmos test -f ${{ github.workspace }} |