Files
Compass/.github/workflows/ci.yml
2026-02-17 12:10:17 +01:00

64 lines
1.5 KiB
YAML

name: Jest Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
name: Jest Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Type check
run: echo skipping #npx tsc --noEmit
- name: Lint
run: npm run lint
- name: Run Jest tests
env:
NEXT_PUBLIC_FIREBASE_ENV: DEV
run: |
yarn test:coverage
# npm install -g lcov-result-merger
# mkdir coverage
# lcov-result-merger \
# "backend/api/coverage/lcov.info" \
# "backend/shared/coverage/lcov.info" \
# "backend/email/coverage/lcov.info" \
# "common/coverage/lcov.info" \
# "web/coverage/lcov.info" \
# > coverage/lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: |
backend/api/coverage/lcov.info
backend/shared/coverage/lcov.info
backend/email/coverage/lcov.info
common/coverage/lcov.info
web/coverage/lcov.info
flags: unit
fail_ci_if_error: true
slug: CompassConnections/Compass
env:
CI: true