-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 952 Bytes
/
code_coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Calculate code coverage
on:
pull_request:
types:
- opened
branches:
- testing
- features/**
- production-fixes/**
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node 20
uses: actions/setup-node@v3
with:
node-version: 20
check-latest: true
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm install
- name: Run tests and collect coverage
continue-on-error: true # To avoid failed test case terminate whole flow
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: npm run coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
verbose: true