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: Lint run: yarn lint - name: Type check run: npx tsc --noEmit - 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