-
Notifications
You must be signed in to change notification settings - Fork 25
45 lines (40 loc) · 1.27 KB
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
env:
GO111MODULE: on
# Intentionally use 22.04 instead of "latest" to
# make this build reproducible.
runs-on: ubuntu-22.04
strategy:
matrix:
go: ['1.17', '1.18', '1.19']
# Build all variants regardless of failures
fail-fast: false
name: Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v3
with:
# By default, the checkout action only fetches the last commit,
# but we want to run DCO check against all commit messages.
# Assuming that a pull request may have multiple commits,
# fetching the single commit doesn't work for us.
#
# While DCO check (on Makefile) checks latest 20 commits,
# the checkout action automatically creates a merge commit
# for merging "master" into a pull request branch.
# So we need to fetch 21 commits (including the merge commit)
# to have 20 actual commits from a pull request.
fetch-depth: 21
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: make deps
- run: make
- run: make lint
- run: make test