Skip to content

support crdb

support crdb #17

Workflow file for this run

name: Build and Test
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18.x, 16.x]
database-type: [crdb221, crdb222, crdb231, postgres12, postgres13, postgres14, postgres15, postgres16]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Start Database(s)
run: |
docker-compose \
--file "docker-compose.yml" \
up \
--detach \
--build \
"${{ matrix.database-type }}"
- name: Run npm install
run: npm ci
- name: Initialize Database
run: |
docker-compose \
--file "docker-compose.yml" \
up \
"wait${{ matrix.database-type }}"
- name: Build and test
run: |
npm run build
npm run test:db
env:
CI: true
DB: ${{ matrix.database-type }}
- name: Stop Database(s)
run: |
docker-compose \
--file "docker-compose.yml" \
down