Skip to content

Commit 22e0852

Browse files
committed
Remove matrix
1 parent 188b16a commit 22e0852

File tree

2 files changed

+21
-38
lines changed

2 files changed

+21
-38
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ jobs:
3636
with:
3737
push: true
3838
build-args:
39-
- 'VERSION=${{ VERSION }}'
39+
- VERSION=${{ steps.set-version.outputs.VERSION }}
4040
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.set-version.outputs.VERSION }}

.github/workflows/ci.yml

Lines changed: 20 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -12,69 +12,47 @@ concurrency:
1212

1313
jobs:
1414
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
2716
steps:
2817
- name: Checkout code
2918
uses: actions/checkout@v3
3019

3120
- name: Install Go
3221
uses: actions/setup-go@v4
3322
with:
34-
go-version: ${{ matrix.go }}
23+
go-version: '1.21'
3524
cache: true
3625

3726
- name: Build
38-
env:
39-
GOARCH: ${{ matrix.arch }}
40-
GOFLAGS: ${{ matrix.flags }}
4127
run: go build ./...
4228

4329
- name: Test
4430
env:
45-
GOARCH: ${{ matrix.arch }}
46-
GOFLAGS: ${{ matrix.flags }}
4731
LOG_LEVEL: error
4832
run: go test -coverprofile=profile.out -covermode=atomic -v -coverpkg=./... ./...
4933

34+
- name: Test -race
35+
env:
36+
LOG_LEVEL: error
37+
run: go test -coverprofile=profile_race.out -race -covermode=atomic -v -coverpkg=./... ./...
38+
5039
- name: Upload artifact
5140
uses: actions/upload-artifact@v3
5241
with:
5342
name: coverage
54-
path: profile.out
43+
path: |
44+
profile.out
45+
profile_race.out
5546
if-no-files-found: error
5647
retention-days: 1
5748

5849
- name: Run benchmarks
59-
if: ${{ !contains(matrix.flags, '-race') }}
6050
env:
61-
GOARCH: ${{ matrix.arch }}
62-
GOFLAGS: ${{ matrix.flags }}
51+
LOG_LEVEL: error
6352
run: go test --timeout=15m --benchtime=3x --benchmem --bench="BenchmarkLightJsonReadPar" --run=$^ ./plugin/input/file/...
6453

6554
e2e_test:
6655
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
7856
steps:
7957
- name: Checkout code
8058
uses: actions/checkout@v3
@@ -93,16 +71,21 @@ jobs:
9371

9472
- name: E2E
9573
env:
96-
GOARCH: ${{ matrix.arch }}
97-
GOFLAGS: ${{ matrix.flags }}
9874
LOG_LEVEL: error
9975
run: go test ./e2e -coverprofile=profile_e2e.out -covermode=atomic -tags=e2e_new -timeout=3m -coverpkg=./...
10076

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+
10182
- name: Upload artifact
10283
uses: actions/upload-artifact@v3
10384
with:
10485
name: coverage
105-
path: profile_e2e.out
86+
path: |
87+
profile_e2e.out
88+
profile_e2e_race.out
10689
if-no-files-found: error
10790
retention-days: 1
10891

@@ -123,7 +106,7 @@ jobs:
123106
- name: Send coverage
124107
uses: codecov/codecov-action@v3
125108
with:
126-
files: profile.out, profile_e2e.out
109+
files: profile.out, profile_race.out, profile_e2e.out, profile_e2e_race.out,
127110

128111
lint:
129112
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)