-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (36 loc) · 1.04 KB
/
go-build.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
---
name: Build
on:
push:
branches: [main, release-*]
pull_request:
jobs:
build:
name: Build and test on go ${{ matrix.go_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go_version: [stable, oldstable]
os: [ubuntu-latest, macOS-latest]
steps:
- name: Check out code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v2.3.4
with:
fetch-depth: 0
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v2.1.4
with:
go-version: ${{ matrix.go_version }}
cache: true
id: go
- name: Get dependencies
run: go mod download
- name: Build
run: make build
- name: Test
run: make test-report
- name: Send coverage
uses: codecov/codecov-action@894ff025c7b54547a9a2a1e9f228beae737ad3c2 # v2.1.0
with:
file: ./reports/coverage.out
flags: unittests,${{ matrix.os }}