Skip to content

chore: add ci script #6

chore: add ci script

chore: add ci script #6

Workflow file for this run

name: Report test coverage
on:
pull_request:
branches:
- "*"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout ⚙️
uses: actions/checkout@v3
- name: Setup node 🔧
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Cache node_modules 💾
uses: actions/cache@v3
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }}
- name: Install dependencies 📦
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: npm ci
- name: Unit Testing 🔎
run: CI=true npm run test:ci
- uses: ArtiomTr/jest-coverage-report-action@v2
with:
test-script: npm run test:ci
coverage-file: report.json
annotations: none