Skip to content

Commit

Permalink
update test CI
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed May 5, 2024
1 parent 0f4ecf1 commit 84d5c10
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,36 +15,41 @@ jobs:
matrix:
go-version: ["1.19", "1.20", "1.21", "^1.22"]
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Run Tests with Race checks
run: go test -v -timeout 300s -race ./...

- name: Run Tests
run: go test -v -timeout 300s -covermode atomic -coverprofile=covprofile ./...

- name: Install goveralls
if: ${{ matrix.go-version == '^1.16' }}
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls

- name: Send coverage
if: ${{ matrix.go-version == '^1.16' }}
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github

- name: Run Benchmarks
run: go test -timeout 300s -bench=. -benchmem

coverage:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["^1.22"]
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Run Tests
run: go test -v -timeout 300s -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github

0 comments on commit 84d5c10

Please sign in to comment.