-
Notifications
You must be signed in to change notification settings - Fork 27
55 lines (45 loc) · 1.16 KB
/
go-tests.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
name: Go Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
permissions: {}
jobs:
linters:
name: Linters
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libbtrfs-dev build-essential apg jq
- uses: actions/setup-go@v5
with:
go-version: '^1.22.3'
- uses: actions/checkout@v3
- name: make lint
run: make golangci-lint && GOLANGCI_LINT_EXTRA_ARGS="--timeout=8m --build-tags=testing,integration" make lint
- name: Verify go vendor, go modules and gofmt
run: |
sudo apt-get install -y jq
make verify
go-tests:
runs-on: ubuntu-latest
needs: [linters]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Golang
uses: actions/setup-go@v3
with:
go-version-file: go.mod
- run: go version
- name: Run GARM Go Tests
run: make go-test