fix: update eslint config and lint errors #1443
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# Run only on production branch | |
- name: Report coverage to SonarCloud | |
if: ${{ github.event.pull_request.merged == true && github.base_ref == 'production' }} | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
args: > | |
-Dsonar.javascript.lcov.reportPaths=packages/**/coverage/lcov.info,apps/nextjs/coverage/lcov.info |