Skip to content

fix up coverage now that the new router is being used #2765

fix up coverage now that the new router is being used

fix up coverage now that the new router is being used #2765

Workflow file for this run

name: Node tests
on: push
jobs:
test-shard:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
env:
SHARD_COUNT: 4
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Setup environment
run: |
cp envs/.env.dev .env
echo "COMPOSE_PROJECT_NAME=test-shard-${{ matrix.shard }}" >> envs/.env.test
echo "DB_PORT=$((3306 + ${{ matrix.shard }}))" >> envs/.env.test
echo "REDIS_PORT=$((6379 + ${{ matrix.shard }}))" >> envs/.env.test
echo "CLICKHOUSE_PORT=$((8123 + ${{ matrix.shard }}))" >> envs/.env.test
- name: Run tests
run: npm test -- --coverage --reporter=blob --shard=${{ matrix.shard }}/${{ env.SHARD_COUNT }}
continue-on-error: true
- name: Upload test reports
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: test-reports-${{ matrix.shard }}
path: .vitest-reports/*
include-hidden-files: true
retention-days: 1
test:
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
needs: test-shard
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Download reports
uses: actions/download-artifact@v4
with:
pattern: test-reports-*
path: .vitest-reports
merge-multiple: true
- name: Merge reports
run: npx vitest --merge-reports --coverage
- uses: codecov/codecov-action@v4
if: always()
with:
token: ${{ secrets.CODECOV_TOKEN }}
build-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Type check
run: npx tsc --noEmit
- name: Build
run: npm run build
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Lint
run: npx eslint