Skip to content

Commit 618c622

Browse files
authored
Fix codecov issues (#13)
* Update codecov.yml * add test-coverage target
1 parent 76bb83a commit 618c622

File tree

2 files changed

+35
-33
lines changed

2 files changed

+35
-33
lines changed

.github/workflows/codecov.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
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
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

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test-coverage:
2+
@go test -race -covermode=atomic -coverprofile=coverage.out ./...

0 commit comments

Comments
 (0)