@@ -12,69 +12,47 @@ concurrency:
12
12
13
13
jobs :
14
14
test :
15
- runs-on : ${{ matrix.runner }}
16
- strategy :
17
- fail-fast : false
18
- matrix :
19
- flags : [ '' ]
20
- go : [ '1.21' ]
21
- arch : [ amd64 ]
22
- runner : [ ubuntu-latest ]
23
- include :
24
- - arch : amd64
25
- runner : ubuntu-latest
26
- flags : -race
15
+ runs-on : ubuntu-latest
27
16
steps :
28
17
- name : Checkout code
29
18
uses : actions/checkout@v3
30
19
31
20
- name : Install Go
32
21
uses : actions/setup-go@v4
33
22
with :
34
- go-version : ${{ matrix.go }}
23
+ go-version : ' 1.21 '
35
24
cache : true
36
25
37
26
- name : Build
38
- env :
39
- GOARCH : ${{ matrix.arch }}
40
- GOFLAGS : ${{ matrix.flags }}
41
27
run : go build ./...
42
28
43
29
- name : Test
44
30
env :
45
- GOARCH : ${{ matrix.arch }}
46
- GOFLAGS : ${{ matrix.flags }}
47
31
LOG_LEVEL : error
48
32
run : go test -coverprofile=profile.out -covermode=atomic -v -coverpkg=./... ./...
49
33
34
+ - name : Test -race
35
+ env :
36
+ LOG_LEVEL : error
37
+ run : go test -coverprofile=profile_race.out -race -covermode=atomic -v -coverpkg=./... ./...
38
+
50
39
- name : Upload artifact
51
40
uses : actions/upload-artifact@v3
52
41
with :
53
42
name : coverage
54
- path : profile.out
43
+ path : |
44
+ profile.out
45
+ profile_race.out
55
46
if-no-files-found : error
56
47
retention-days : 1
57
48
58
49
- name : Run benchmarks
59
- if : ${{ !contains(matrix.flags, '-race') }}
60
50
env :
61
- GOARCH : ${{ matrix.arch }}
62
- GOFLAGS : ${{ matrix.flags }}
51
+ LOG_LEVEL : error
63
52
run : go test --timeout=15m --benchtime=3x --benchmem --bench="BenchmarkLightJsonReadPar" --run=$^ ./plugin/input/file/...
64
53
65
54
e2e_test :
66
55
runs-on : ubuntu-latest
67
- strategy :
68
- fail-fast : false
69
- matrix :
70
- flags : [ '' ]
71
- go : [ '1.21' ]
72
- arch : [ amd64 ]
73
- runner : [ ubuntu-latest ]
74
- include :
75
- - arch : amd64
76
- runner : ubuntu-latest
77
- flags : -race
78
56
steps :
79
57
- name : Checkout code
80
58
uses : actions/checkout@v3
@@ -93,16 +71,21 @@ jobs:
93
71
94
72
- name : E2E
95
73
env :
96
- GOARCH : ${{ matrix.arch }}
97
- GOFLAGS : ${{ matrix.flags }}
98
74
LOG_LEVEL : error
99
75
run : go test ./e2e -coverprofile=profile_e2e.out -covermode=atomic -tags=e2e_new -timeout=3m -coverpkg=./...
100
76
77
+ - name : E2E -race
78
+ env :
79
+ LOG_LEVEL : error
80
+ run : go test ./e2e -coverprofile=profile_e2e_race.out -race -covermode=atomic -tags=e2e_new -timeout=3m -coverpkg=./...
81
+
101
82
- name : Upload artifact
102
83
uses : actions/upload-artifact@v3
103
84
with :
104
85
name : coverage
105
- path : profile_e2e.out
86
+ path : |
87
+ profile_e2e.out
88
+ profile_e2e_race.out
106
89
if-no-files-found : error
107
90
retention-days : 1
108
91
@@ -123,7 +106,7 @@ jobs:
123
106
- name : Send coverage
124
107
uses : codecov/codecov-action@v3
125
108
with :
126
- files : profile.out, profile_e2e.out
109
+ files : profile.out, profile_race.out, profile_e2e.out, profile_e2e_race.out,
127
110
128
111
lint :
129
112
runs-on : ubuntu-latest
0 commit comments