-
Notifications
You must be signed in to change notification settings - Fork 10
47 lines (37 loc) · 1.04 KB
/
main-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
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