imrpove grammar builder type (#32) #24
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: Integration Test | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18.x] | |
database-type: [ mysql57, mysql8, maria1003, maria1011, sqlite, postgres12, postgres16, sqlsrv17, sqlsrv22 ] | |
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) | |
if: ${{ matrix.database-type != 'sqlite' }} | |
run: | | |
docker-compose \ | |
--file "docker-compose.yml" \ | |
up \ | |
--detach \ | |
--build \ | |
"${{ matrix.database-type }}" | |
- name: Start Database(s) | |
if: ${{ matrix.database-type == 'sqlite' }} | |
run: | | |
npm run sqlite:up | |
- name: Run npm install | |
run: npm ci | |
- name: Initialize Database | |
if: ${{ matrix.database-type != 'sqlite' }} | |
run: | | |
docker-compose \ | |
--file "docker-compose.yml" \ | |
up \ | |
"wait${{ matrix.database-type }}" | |
- name: Build and test | |
run: | | |
npm run build | |
npm run test:integration | |
env: | |
CI: true | |
DB: ${{ matrix.database-type }} | |
TZ: "Africa/Algiers" | |
- name: Stop Database(s) | |
if: ${{ matrix.database-type != 'sqlite' }} | |
run: | | |
docker-compose \ | |
--file "docker-compose.yml" \ | |
down | |
- name: Stop Database(s) | |
if: ${{ matrix.database-type == 'sqlite' }} | |
run: | | |
npm run sqlite:down |