This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (57 loc) · 1.57 KB
/
tests.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: tests
on:
push:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '>=1.20.0'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.0
test:
needs: lint
strategy:
matrix:
go: ['>=1.20.0']
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- run: go mod download
- run: go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ github.token }}
GIT_BRANCH: ${{ github.head_ref }}
run: goveralls -parallel -coverprofile=covprofile -service=github -flagname="${{ runner.os }}-Go-${{ matrix.go }}"
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.18.x
- uses: actions/checkout@v3
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ github.token }}
GIT_BRANCH: ${{ github.head_ref }}
run: goveralls -parallel-finish -service=github