forked from firecracker-microvm/firectl
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.4 KB
/
go.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
name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
strategy:
matrix:
go: ['1.14', '1.15', '1.16']
os: ['ubuntu-20.04']
name: ${{ matrix.os }} / Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
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 5 commits,
# the checkout action automatically creates a merge commit
# for merging "main" into a pull request branch.
# In addition to that, Git cannot recognize merge commits when
# one of the parents is missing.
# So, we will fetch 15 commits just in case to have
# 5 actual commits with associated merged commits.
fetch-depth: 15
- name: Run static analysis
run: make lint
- name: Build
run: make all
# GitHub Actions' VMs don't have KVM. Firecracker itself won't work.
- name: Test
run: SKIP_INTEG_TEST=1 make test