Skip to content

feat: test coverage #1404

feat: test coverage

feat: test coverage #1404

Workflow file for this run

name: Jest
on:
pull_request:
branches: ["*"]
jobs:
test-jest:
env:
# You can leverage Vercel Remote Caching with Turbo to speed up your builds
# @link https://turborepo.org/docs/core-concepts/remote-caching#remote-caching-on-vercel-builds
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install deps (with cache)
run: pnpm install
- name: Generate prisma client
run: pnpm db-generate:no-engine
- name: Inject Doppler env vars
uses: dopplerhq/[email protected]
id: doppler
with:
doppler-token: ${{ secrets.DOPPLER_TOKEN }}
inject-env-vars: true
- name: Run tests
run: pnpm turbo test --cache-dir=".turbo" -- --maxWorkers=33% --coverage
- name: Debug possible coverage paths
run: |
echo "Searching for coverage files..."
find packages/**/coverage -name "lcov.info" || echo "No coverage files found in packages."
find apps/nextjs/coverage -name "lcov.info" || echo "No coverage files found in apps/nextjs."
- name: Upload coverage artifact
env:
ACTIONS_STEP_DEBUG: true
uses: actions/upload-artifact@v3
with:
name: coverage-reports
path: |
packages/**/coverage/lcov.info
apps/nextjs/coverage/lcov.info