-
-
Notifications
You must be signed in to change notification settings - Fork 140
55 lines (49 loc) · 1.29 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
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
go:
- '1.13' # minimum version
- 'oldstable'
- 'stable'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: go version
- name: build
run: |
go get ./...
go install .
- name: test
run: goveralls -service=github -parallel -flagname="Unit-${{ matrix.os }}-Go-${{ matrix.go }}"
env:
COVERALLS_TOKEN: ${{ github.token }}
GIT_BRANCH: ${{ github.head_ref }}
finish:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Go
uses: actions/setup-go@v4
- name: finish
run: |
go run github.com/mattn/goveralls -parallel-finish
env:
COVERALLS_TOKEN: ${{ github.token }}
GIT_BRANCH: ${{ github.head_ref }}