Skip to content

Commit

Permalink
Remove matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimalekseev committed Aug 13, 2023
1 parent 188b16a commit 22e0852
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ jobs:
with:
push: true
build-args:
- 'VERSION=${{ VERSION }}'
- VERSION=${{ steps.set-version.outputs.VERSION }}
tags: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.set-version.outputs.VERSION }}
57 changes: 20 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,69 +12,47 @@ concurrency:

jobs:
test:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
flags: [ '' ]
go: [ '1.21' ]
arch: [ amd64 ]
runner: [ ubuntu-latest ]
include:
- arch: amd64
runner: ubuntu-latest
flags: -race
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
go-version: '1.21'
cache: true

- name: Build
env:
GOARCH: ${{ matrix.arch }}
GOFLAGS: ${{ matrix.flags }}
run: go build ./...

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

- name: Test -race
env:
LOG_LEVEL: error
run: go test -coverprofile=profile_race.out -race -covermode=atomic -v -coverpkg=./... ./...

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: profile.out
path: |
profile.out
profile_race.out
if-no-files-found: error
retention-days: 1

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

e2e_test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flags: [ '' ]
go: [ '1.21' ]
arch: [ amd64 ]
runner: [ ubuntu-latest ]
include:
- arch: amd64
runner: ubuntu-latest
flags: -race
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -93,16 +71,21 @@ jobs:

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

- name: E2E -race
env:
LOG_LEVEL: error
run: go test ./e2e -coverprofile=profile_e2e_race.out -race -covermode=atomic -tags=e2e_new -timeout=3m -coverpkg=./...

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: profile_e2e.out
path: |
profile_e2e.out
profile_e2e_race.out
if-no-files-found: error
retention-days: 1

Expand All @@ -123,7 +106,7 @@ jobs:
- name: Send coverage
uses: codecov/codecov-action@v3
with:
files: profile.out, profile_e2e.out
files: profile.out, profile_race.out, profile_e2e.out, profile_e2e_race.out,

lint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 22e0852

Please sign in to comment.