Skip to content

chore: improve tests #17

chore: improve tests

chore: improve tests #17

Workflow file for this run

name: 'tests'
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**/*.md'
schedule:
- cron: '0 9 * * *'
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node: [18, 20, 22]
steps:
- uses: actions/checkout@main
- name: Setup NodeJS ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
npm ci
- name: Linting
run: |
npm run lint
- name: Unit testing
run: |
npm run test
node-integration-tests-local-single-node:
needs: unit-tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
node: [18, 20, 22]
clickhouse: [head, latest]
steps:
- uses: actions/checkout@main
- name: Start ClickHouse (version - ${{ matrix.clickhouse }}) using docker-compose
uses: isbang/[email protected]
env:
CLICKHOUSE_VERSION: ${{ matrix.clickhouse }}
with:
compose-file: 'docker-compose.yml'
down-flags: '--volumes'
- name: Setup NodeJS ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
npm ci
- name: Build
run: |
npm run build
- name: Test - apply migrations ./tests/migrations/few
run: |
node ./lib/cli.js migrate --host=http://localhost:8123 --user=default --password='' --db=analytics --migrations-home=./tests/migrations/few
- name: Verify Migration
run: |
curl http://localhost:8123/?query=SHOW%20TABLES