61 lines (53 loc) · 1.38 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Coverage
on:
pull_request:
paths:
- "**/package.json"
- "**/package-lock.json"
- "**/*.ts"
- "**/*.js"
- ".github/workflows/coverage.yml"
- "!docs/**"
push:
branches:
- main
paths:
- "**/package.json"
- "**/package-lock.json"
- "**/*.ts"
- "**/*.js"
- ".github/workflows/coverage.yml"
- "!docs/**"
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3.0.0
with:
cache: npm
- run: npm i -g npm@8
- run: npm -v
- name: Restore CSpell cache
uses: actions/cache@v3
with:
key: cspell-cache-${{ runner.os }}-coverage-${{ hashFiles('**/*.ts', '**/*.md') }}
path: |
.cspell/.cspellcache
restore-keys: |
cspell-cache-${{ runner.os }}-coverage-
cspell-cache-${{ runner.os }}-
- run: npm ci
- run: npm run build
- run: npm run coverage
- name: Upload coverage Coveralls
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2.1.0
with:
directory: "."
files: ./lcov.info