Skip to content

Commit

Permalink
ci: integrate codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
libotony committed Dec 20, 2023
1 parent 2fdb17f commit 4d86368
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
unit_tests:
strategy:
matrix:
go-version: [1.20.x]
go-version: [1.21.x]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- go-version: 1.17.x
os: ubuntu-latest
- go-version: 1.18.x
os: ubuntu-latest
- go-version: 1.19.x
os: ubuntu-latest
- go-version: 1.20.x
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
Expand All @@ -30,3 +30,22 @@ jobs:

- name: Make Test
run: make test
test_coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x

- name: Make all
run: make all

- name: Make Coverage
run: make test-coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ package.json
/.vscode/
/vendor/

.fake_gopath_suffix
.fake_gopath_suffix
coverage.out
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ $(CURDIR)/bin/disco
test:| go_version_check
@go test -cover $(PACKAGES)

test-coverage:| go_version_check
@go test -race -coverprofile=coverage.out -covermode=atomic $(PACKAGES)

0 comments on commit 4d86368

Please sign in to comment.