Skip to content

feat: add jest coverage #122

feat: add jest coverage

feat: add jest coverage #122

Workflow file for this run

name: Next Bulletproof Template CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build-lint-test-lhci:
name: Build & Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Lint codebase
run: yarn lint
- name: Test codebase
run: yarn test
- name: Build Project
run: yarn build
- name: Test and generate coverage report
uses: artiomtr/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
package-manager: yarn
skip-step: install
test-script: yarn test
custom-title: Jest Coverage Report
- uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# Commenting out SonarQube Quality Gate action for now
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Lighthouse CI
run: |
yarn global add @lhci/[email protected]
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}