Test run #30
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: Test run | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- playground-* | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
nodeVersion: [16, 18, 20, 22] | |
typeormVersion: [0.3.12, 0.3.14, 0.3.16, 0.3.17, 0.3.19, 0.3.20, latest] | |
fail-fast: false | |
services: | |
db: | |
image: postgres:latest | |
ports: | |
- "5432:5432" | |
env: | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_DB: postgres | |
hasura: | |
image: hasura/graphql-engine:latest | |
ports: | |
- "8080:8080" | |
env: | |
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgres@db:5432/postgres | |
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console | |
HASURA_GRAPHQL_DEV_MODE: "true" # set to "false" to disable access control | |
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log | |
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey # set this to secure your endpoints | |
env: | |
DB_URL: postgres://postgres:postgres@localhost:5432/postgres | |
HASURA_DATABASE_URL: postgres://postgres:postgres@db:5432/postgres | |
"HASURA_URL": "http://localhost:8080" | |
"HASURA_GRAPHQL_ADMIN_SECRET": "myadminsecretkey" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.nodeVersion }} | |
- name: "Install" | |
run: npm install --no-save typeorm@${{ matrix.typeormVersion }} | |
- name: "Build" | |
run: npm run build | |
- name: "Test" | |
run: npm run test | |
- name: "Apply typeorm migrations" | |
run: npm run play:up | |
- name: "Apply hasura migrations" | |
run: npm run play:hasura:apply |