-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.63 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
49
50
51
52
53
54
55
56
57
58
name: Test and coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
# - run: npm run build --if-present
- run: npm test
- name: Test coverage (Codecov.com)
uses: codecov/codecov-action@v3
with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./__test__/reports/clover.xml # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
# fail_ci_if_error: false # optional (default = false)
# verbose: true # optional (default = false)
- name: Publish code coverage to Codeclimate.com
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: 15ecb7c2e52ea0fef2aa73c09d14ca3d6a875195a33538da0046bd5844fb467d
with:
coverageLocations: |
${{github.workspace}}/__test__/reports/lcov.info:lcov
- name: Update README
run: |-
npm run badges
cat README.md
- name: Commit and push
run: |-
git add README.md
git diff
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action Bot"
git commit -m "Updated README" -a || echo "No changes to commit"
git push