Skip to content

update test CI

update test CI #57

Workflow file for this run

name: Main CI
on:
push:
branches: "*"
pull_request:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
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 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