-
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.05 KB
/
publish-code-coverage.yml
File metadata and controls
45 lines (38 loc) · 1.05 KB
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
38
39
40
41
42
43
44
45
name: publish code coverage
on:
push:
branches: ["main"]
paths:
[
"**.ts",
"jest.config.js*",
".github/workflows/publish-code-coverage.yml",
]
workflow_dispatch:
jobs:
publish-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup node.js @ lts
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Cache node_modules
id: cache
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-lts/*-build-node-modules-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: npm ci
- name: Generate code coverage reports
run: npm test -- --coverage
continue-on-error: true
- name: Publish code coverage to codecov 🚀
uses: codecov/codecov-action@v3
with:
verbose: true
fail_ci_if_error: true