Skip to content

fix: pass tests amd github action matrix #23

fix: pass tests amd github action matrix

fix: pass tests amd github action matrix #23

Workflow file for this run

name: Test run
on:
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:v2.36.1
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