-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.22 KB
/
codecov.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
# Requires repo secret: CODECOV_TOKEN ("repository upload token")
name: Codecov
on:
pull_request:
types:
- opened
- synchronize # HEAD has changed, e.g. a push happened
- reopened
push:
branches:
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
codecov-lint:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: formsort/action-check-codecov-config@v1
# !!! The codecov/project check should be required by GitHub !!!
# See ../../codecov.yml for the configuration that drives the check
codecov:
needs:
- codecov-lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# Setup and install
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
- run: npm ci
# Run test coverage
- run: npm run test:coverage
- run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov
for dir in packages/*; do
./codecov --dir "${dir}" --flags "$(basename "${dir}")" --token "${CODECOV_TOKEN}" --verbose
done
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}