-
Notifications
You must be signed in to change notification settings - Fork 13
42 lines (33 loc) · 882 Bytes
/
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
name: Go
on: [push, pull_request]
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.15', '1.16' ]
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out code
uses: actions/checkout@v2
- name: Install systemd lib dependencies
run: |
sudo apt update
sudo apt install libsystemd-dev
- name: Get dependencies
run: |
go get golang.org/x/lint/golint
- name: Check formatting
run: go fmt
- name: Vet
run: go vet
- name: Lint
run: golint ./... # for now don't set --set_exit_status so build passes
- name: systemk Build
run: go build -v ./...
- name: systemk Test (unit)
run: sudo go test -v ./... # without sudo, can't write to /var/run