Skip to content

Commit 3b8cc1d

Browse files
authored
Merge pull request #5 from cpunion/ci
code coverage
2 parents c2712bf + fe132e2 commit 3b8cc1d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/go.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,15 @@ jobs:
2929
- name: Build
3030
run: go build -v ./...
3131

32-
- name: Test
33-
run: go test -v ./...
32+
- name: Test with coverage
33+
run: go test -p 1 -v -race -coverprofile=coverage.txt -covermode=atomic ./...
34+
35+
- name: Upload coverage to Codecov
36+
if: matrix.os == 'ubuntu-24.04'
37+
uses: codecov/codecov-action@v4
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
file: ./coverage.txt
41+
flags: unittests
42+
name: codecov-umbrella
43+
fail_ci_if_error: true

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# go-python: Write Python in Go - The most intuitive Python wrapper for Golang
22

3+
[![codecov](https://codecov.io/github/cpunion/go-python/graph/badge.svg?token=DLVMvjAOFM)](https://codecov.io/github/cpunion/go-python)
4+
35
## Goal
46

57
- Automatically DecRef for Python objects.

0 commit comments

Comments
 (0)