File tree 2 files changed +54
-39
lines changed
2 files changed +54
-39
lines changed Original file line number Diff line number Diff line change 1
1
version : 2
2
2
jobs :
3
- go1.21 : &base
3
+ go1.22 : &base
4
4
docker :
5
- - image : cimg/go:1.21
5
+ - image : cimg/go:1.22
6
6
steps :
7
7
- run : go version
8
8
- checkout
9
- - run : go test -tags nikandfor_loc_unsafe -race -v ./...
9
+ - run : go test -tags nikandfor_loc_unsafe -v ./...
10
+ - run : go test -tags nikandfor_loc_unsafe -v -race ./...
11
+
12
+ go1.21 :
13
+ << : *base
14
+ docker :
15
+ - image : cimg/go:1.21
10
16
11
17
go1.20 :
12
18
<< : *base
@@ -28,28 +34,21 @@ jobs:
28
34
docker :
29
35
- image : cimg/go:1.17
30
36
31
- go1.16 :
32
- << : *base
33
- docker :
34
- - image : circleci/golang:1.16
35
- working_directory : /go/wd
36
-
37
- go1.15 :
38
- << : *base
39
- docker :
40
- - image : circleci/golang:1.15
41
37
42
- go1.14 :
38
+ go1.22_safe : &base_safe
43
39
<< : *base
44
40
docker :
45
- - image : circleci/golang:1.14
46
-
47
- go1.21_safe : &base_safe
48
- << : *base
41
+ - image : cimg/go:1.22
49
42
steps :
50
43
- run : go version
51
44
- checkout
52
- - run : go test -race -v ./...
45
+ - run : go test -v -race ./...
46
+ - run : go test -v ./...
47
+
48
+ go1.21_safe :
49
+ << : *base_safe
50
+ docker :
51
+ - image : cimg/go:1.21
53
52
54
53
go1.20_safe :
55
54
<< : *base_safe
@@ -70,15 +69,14 @@ workflows:
70
69
version : 2
71
70
build :
72
71
jobs :
72
+ - go1.22_safe
73
73
- go1.21_safe
74
74
- go1.20_safe
75
75
- go1.19_safe
76
76
- go1.18_safe
77
+ - go1.22
77
78
- go1.21
78
79
- go1.20
79
80
- go1.19
80
81
- go1.18
81
82
- go1.17
82
- # - go1.16 test passes in official docker image (arm64), but not in circleci
83
- - go1.15
84
- - go1.14
Original file line number Diff line number Diff line change 1
- # This workflow will build a golang project
2
- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3
-
4
1
name : Go
5
2
6
3
on :
10
7
branches : [ "master" ]
11
8
12
9
jobs :
13
-
14
- build :
15
- runs-on : ubuntu-latest
10
+ test :
11
+ strategy :
12
+ matrix :
13
+ os : ["ubuntu-latest", "macos-latest", "windows-latest"]
14
+ go-ver : ["1.22", "1.21", "1.20", "1.19"]
15
+ include :
16
+ - os : " ubuntu-latest"
17
+ go-ver : " 1.22"
18
+ cover : true
19
+
20
+ runs-on : ${{ matrix.os }}
16
21
steps :
17
- - uses : actions/checkout@v3
22
+ - uses : actions/checkout@v3
23
+
24
+ - name : Set up Go
25
+ uses : actions/setup-go@v4
26
+ with :
27
+ go-version : ${{ matrix.go-ver }}
28
+
29
+ - name : Build
30
+ run : go build -v ./...
31
+
32
+ - name : Test with Cover
33
+ run : go test -v -coverprofile=coverage.txt -covermode=atomic ./...
34
+ if : ${{ matrix.cover }}
18
35
19
- - name : Set up Go
20
- uses : actions/setup-go@v3
21
- with :
22
- go-version : " 1.21"
36
+ - name : Test without Cover
37
+ run : go test -v ./...
38
+ if : ${{ !matrix.cover }}
23
39
24
- - name : Build
25
- run : go build -v ./...
40
+ - name : Test Race
41
+ run : go test -race -v ./...
26
42
27
- - name : Test
28
- run : go test -v -coverprofile=coverage.txt -covermode=atomic ./...
43
+ - name : Upload coverage reports to Codecov
44
+ uses : codecov/codecov-action@v4
45
+ if : ${{ matrix.cover }}
46
+ env :
47
+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
29
48
30
- - name : Upload coverage reports to Codecov
31
- uses : codecov/codecov-action@v3
You can’t perform that action at this time.
0 commit comments