-
Notifications
You must be signed in to change notification settings - Fork 25
73 lines (62 loc) · 1.46 KB
/
ci-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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: ci-build
on:
push:
branches:
- master
tags-ignore:
- '*.*'
pull_request:
branches:
- master
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.18.x,1.19.x]
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test ${{ matrix.os }} with Go ${{ matrix.go-version }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles ('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Verify parser
if: runner.os == 'Linux'
run: |
make verify-parser
- name: Build
run: |
make build
- name: Test
run: |
make test-with-coverage
- name: Codecov
if: runner.os == 'Linux'
uses: codecov/codecov-action@v3
with:
# Path to coverage file to upload
file: coverprofile.out
golangci:
name: Lint with Go ${{ matrix.go-version }}
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.18.x]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: -c .golangci.yml