16
16
os : [ubuntu-latest, macos-latest]
17
17
go : ['1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15']
18
18
fail-fast : false
19
+ env :
20
+ OS : ${{ matrix.os }}
21
+ GO : ${{ matrix.go }}
19
22
steps :
20
23
- if : startsWith(matrix.os, 'macos')
21
24
run : brew update
@@ -26,29 +29,31 @@ jobs:
26
29
27
30
- name : Get Build Tools
28
31
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
31
33
32
34
- name : Add $GOPATH/bin to $PATH
33
35
run : |
34
36
echo "::add-path::$(go env GOPATH)/bin"
35
37
36
38
- uses : actions/checkout@v2
37
39
38
- - name : Setup goveralls
39
- run : goveralls -repotoken 3qJVUE0iQwqnCbmNcDsjYu1nh4J4KIFXx -parallel
40
-
41
40
- name : ' Tags: default'
42
- run : go test - race -v . -tags ""
41
+ run : go-acc . -- - race -v -tags ""
43
42
44
43
- name : ' Tags: libsqlite3'
45
- run : go test - race -v . -tags "libsqlite3"
44
+ run : go-acc . -- - race -v -tags "libsqlite3"
46
45
47
46
- 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"
49
48
50
49
- 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
52
57
53
58
test-windows :
54
59
name : Test for Windows
61
66
matrix :
62
67
go : ['1.11.13', '1.12.17', '1.13.15', '1.14.7', '1.15']
63
68
fail-fast : false
69
+ env :
70
+ OS : windows-latest
71
+ GO : ${{ matrix.go }}
64
72
steps :
65
73
- uses : msys2/setup-msys2@v2
66
74
with :
75
83
76
84
- name : Get Build Tools
77
85
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
80
87
shell : msys2 {0}
81
88
82
89
- name : Add $GOPATH/bin to $PATH
@@ -86,46 +93,28 @@ jobs:
86
93
87
94
- uses : actions/checkout@v2
88
95
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 ""
95
98
shell : msys2 {0}
96
99
97
- - name : Test2
98
- run : go test - race -v . -tags "libsqlite3"
100
+ - name : ' Tags: libsqlite3 '
101
+ run : go-acc . -- - race -v -tags "libsqlite3"
99
102
shell : msys2 {0}
100
103
101
- - name : Test3
104
+ - name : ' Tags: full '
102
105
run : |
103
106
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"
105
108
shell : msys2 {0}
106
109
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"
109
112
shell : msys2 {0}
110
113
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
117
116
with :
118
- go-version : 1.x
117
+ env_vars : OS,GO
118
+ file : coverage.txt
119
119
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
131
120
# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml
0 commit comments