-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 940 Bytes
/
unit-test.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
name: unit-tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
# https://github.com/actions/go-versions/blob/main/versions-manifest.json
go-version: "stable"
id: go
- name: Get dependencies
run: |
go get -v -t -d ./...
# https://github.com/golangci/golangci-lint-action
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.61.0
# Workaround for "file exists" errors while running tar.
# golangci-lint-action conflicts with caching in setup-go
skip-pkg-cache: true
- name: Build
run: make build
- name: Unit tests
run: make test