Skip to content

Commit 76bb83a

Browse files
authored
Update codecov.yml (#12)
1 parent f3de626 commit 76bb83a

File tree

1 file changed

+33
-21
lines changed

1 file changed

+33
-21
lines changed

.github/workflows/codecov.yml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
1-
name: Upload Coverage Reports to Codecov
2-
3-
on:
4-
push:
5-
branches:
6-
- master
7-
8-
jobs:
9-
coverage_report:
10-
name: Upload coverage reports to Codecov
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v2
15-
16-
- name: Upload coverage reports to Codecov
17-
uses: codecov/codecov-action@v3
18-
with:
19-
token: ${{ secrets.CODECOV }}
20-
file: ./coverage.xml
21-
fail_ci_if_error: true
1+
name: Codecov
2+
3+
on:
4+
  push:
5+
    branches: [master]
6+
  pull_request:
7+
    branches: [master]
8+
9+
jobs:
10+
  coverage:
11+
    name: coverage
12+
    runs-on: ubuntu-latest
13+
    defaults:
14+
      run:
15+
        working-directory: main
16+
    steps:
17+
      - name: Checkout repository
18+
        uses: actions/checkout@v3
19+
        with:
20+
          path: main
21+
      - name: Set up Go
22+
        uses: actions/setup-go@v4
23+
        with:
24+
          go-version-file: "main/go.mod"
25+
          check-latest: true
26+
          cache: true
27+
          cache-dependency-path: "main/go.sum"
28+
      - name: Run coverage
29+
        run: make test-coverage
30+
      - name: Upload coverage to Codecov
31+
        uses: codecov/codecov-action@v3
32+
        with:
33+
          working-directory: main

0 commit comments

Comments
 (0)