Skip to content

Commit 4b46e2b

Browse files
authored
coveralls to codecov (#845)
* coveralls to codecov * README badge coveralls to codecov
1 parent c14096f commit 4b46e2b

File tree

3 files changed

+35
-42
lines changed

3 files changed

+35
-42
lines changed

.codecov.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
coverage:
2+
status:
3+
project: off
4+
patch: off

.github/workflows/go.yaml

+30-41
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
os: [ubuntu-latest, macos-latest]
1717
go: ['1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15']
1818
fail-fast: false
19+
env:
20+
OS: ${{ matrix.os }}
21+
GO: ${{ matrix.go }}
1922
steps:
2023
- if: startsWith(matrix.os, 'macos')
2124
run: brew update
@@ -26,29 +29,31 @@ jobs:
2629

2730
- name: Get Build Tools
2831
run: |
29-
go get github.com/mattn/goveralls
30-
go get golang.org/x/tools/cmd/cover
32+
go get github.com/ory/go-acc
3133
3234
- name: Add $GOPATH/bin to $PATH
3335
run: |
3436
echo "::add-path::$(go env GOPATH)/bin"
3537
3638
- uses: actions/checkout@v2
3739

38-
- name: Setup goveralls
39-
run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel
40-
4140
- name: 'Tags: default'
42-
run: go test -race -v . -tags ""
41+
run: go-acc . -- -race -v -tags ""
4342

4443
- name: 'Tags: libsqlite3'
45-
run: go test -race -v . -tags "libsqlite3"
44+
run: go-acc . -- -race -v -tags "libsqlite3"
4645

4746
- name: 'Tags: full'
48-
run: go test -race -v . -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
47+
run: go-acc . -- -race -v -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
4948

5049
- name: 'Tags: vacuum'
51-
run: go test -race -v . -tags "sqlite_vacuum_full"
50+
run: go-acc . -- -race -v -tags "sqlite_vacuum_full"
51+
52+
- name: Upload coverage to Codecov
53+
uses: codecov/codecov-action@v1
54+
with:
55+
env_vars: OS,GO
56+
file: coverage.txt
5257

5358
test-windows:
5459
name: Test for Windows
@@ -61,6 +66,9 @@ jobs:
6166
matrix:
6267
go: ['1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15']
6368
fail-fast: false
69+
env:
70+
OS: windows-latest
71+
GO: ${{ matrix.go }}
6472
steps:
6573
- uses: msys2/setup-msys2@v2
6674
with:
@@ -75,8 +83,7 @@ jobs:
7583

7684
- name: Get Build Tools
7785
run: |
78-
go get github.com/mattn/goveralls
79-
go get golang.org/x/tools/cmd/cover
86+
go get -u github.com/ory/go-acc
8087
shell: msys2 {0}
8188

8289
- name: Add $GOPATH/bin to $PATH
@@ -86,46 +93,28 @@ jobs:
8693

8794
- uses: actions/checkout@v2
8895

89-
- name: Setup goveralls
90-
run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel
91-
shell: msys2 {0}
92-
93-
- name: Test1
94-
run: go test -race -v . -tags ""
96+
- name: 'Tags: default'
97+
run: go-acc . -- -race -v -tags ""
9598
shell: msys2 {0}
9699

97-
- name: Test2
98-
run: go test -race -v . -tags "libsqlite3"
100+
- name: 'Tags: libsqlite3'
101+
run: go-acc . -- -race -v -tags "libsqlite3"
99102
shell: msys2 {0}
100103

101-
- name: Test3
104+
- name: 'Tags: full'
102105
run: |
103106
echo 'skip this test'
104-
echo go test -race -v . -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
107+
echo go-acc . -- -race -v -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_userauth sqlite_vacuum_incr sqlite_vtable sqlite_unlock_notify"
105108
shell: msys2 {0}
106109

107-
- name: Test4
108-
run: go test -race -v . -tags "sqlite_vacuum_full"
110+
- name: 'Tags: vacuum'
111+
run: go-acc . -- -race -v -tags "sqlite_vacuum_full"
109112
shell: msys2 {0}
110113

111-
finish:
112-
needs: [test, test-windows]
113-
name: Test Finished
114-
runs-on: ubuntu-latest
115-
steps:
116-
- uses: actions/setup-go@v2
114+
- name: Upload coverage to Codecov
115+
uses: codecov/codecov-action@v1
117116
with:
118-
go-version: 1.x
117+
env_vars: OS,GO
118+
file: coverage.txt
119119

120-
- name: Get Build Tools
121-
run: |
122-
go get github.com/mattn/goveralls
123-
go get golang.org/x/tools/cmd/cover
124-
- name: Add $GOPATH/bin to $PATH
125-
run: |
126-
echo "::add-path::$(go env GOPATH)/bin"
127-
- name: Send coverage
128-
env:
129-
COVERALLS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
130-
run: goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel-finish
131120
# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go-sqlite3
44
[![GoDoc Reference](https://godoc.org/github.com/mattn/go-sqlite3?status.svg)](http://godoc.org/github.com/mattn/go-sqlite3)
55
[![GitHub Actions](https://github.com/mattn/go-sqlite3/workflows/Go/badge.svg)](https://github.com/mattn/go-sqlite3/actions?query=workflow%3AGo)
66
[![Financial Contributors on Open Collective](https://opencollective.com/mattn-go-sqlite3/all/badge.svg?label=financial+contributors)](https://opencollective.com/mattn-go-sqlite3)
7-
[![Coverage Status](https://coveralls.io/repos/mattn/go-sqlite3/badge.svg?branch=master)](https://coveralls.io/r/mattn/go-sqlite3?branch=master)
7+
[![codecov](https://codecov.io/gh/mattn/go-sqlite3/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-sqlite3)
88
[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-sqlite3)](https://goreportcard.com/report/github.com/mattn/go-sqlite3)
99

1010
Latest stable version is v1.14 or later not v2.

0 commit comments

Comments
 (0)