-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (43 loc) · 1.13 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
name: Unit Test
on:
push:
branches:
- release/refactor-3.0.0
- feature/badge
- gh-pages
pull_request:
branches:
- release/refactor-3.0.0
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
package: [utils]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run tests with coverage
run: |
cd packages/${{ matrix.package }}
pnpm run test:coverage
cp -r coverage ../..
cd ..
cd ..
- name: Uploada coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: packages/${{ matrix.package }}/coverage/lcov.info
flags: unittests
name: codecov-umbrella
- name: Update Coverage Badge
uses: we-cli/coverage-badge-action@main