Skip to content

ci: update node versions #17

ci: update node versions

ci: update node versions #17

Workflow file for this run

name: CI/CD Pipeline
on:
push:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14.21.3-buster
- 16.20.1-buster
- 18.17.0-buster
container:
image: node:${{ matrix.node-version }}
services:
postgres:
image: postgres:13.2
env:
POSTGRES_DB: graphile
POSTGRES_PASSWORD: graphile
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
NODE_ENV: test
REDIS_URL: redis://redis:6379
TEST_DATABASE_URL: postgres://postgres:graphile@postgres/graphile
steps:
- name: checkout
uses: actions/checkout@v2
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node:${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node:${{ matrix.node-version }}-yarn-
- run: yarn install
- name: Lint Apps
shell: bash
run: yarn lint
- name: Migrate worker
shell: bash
run: yarn graphile-worker -c "$TEST_DATABASE_URL" --schema-only
- name: Run Tests
shell: bash
run: yarn test --detectOpenHandles --forceExit