71 lines (62 loc) · 1.75 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
62
63
64
65
66
67
68
69
70
71
name: Coverage
on:
pull_request:
paths:
- "*.js"
- "*.ts"
- "package-lock.json"
- "package.json"
- "packages/**/*.js"
- "packages/**/*.ts"
- "packages/**/package-lock.json"
- "packages/**/package.json"
- ".github/workflows/coverage.yml"
- "!docs/**"
push:
branches:
- main
paths:
- "**/package.json"
- "**/package-lock.json"
- "**/*.ts"
- "**/*.js"
- ".github/workflows/coverage.yml"
- "!docs/**"
permissions:
contents: read
jobs:
coverage:
permissions:
checks: write # for coverallsapp/github-action to create new checks
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3.2.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@9ba913c152ae4be1327bfb9085dc806cedb44057 # 1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3
with:
directory: "."
files: ./lcov.info