-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (37 loc) · 1.06 KB
/
main.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
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: ['1.21.x', '1.22.x']
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
go mod download
- name: Test
run: go test -v -race $(go list ./...) -coverprofile=profile.cov
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: profile.cov
parallel: true
flag-name: ${{ join(matrix.*, ' ') }}
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "1.21.x ubuntu-latest,1.21.x macos-latest,1.22.x ubuntu-latest,1.22.x macos-latest"