-
Notifications
You must be signed in to change notification settings - Fork 1
69 lines (56 loc) · 1.63 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
pull_request:
branches: [main]
workflow_call:
workflow_dispatch:
permissions:
contents: read
env:
# renovate: datasource=github-releases depName=dominikh/go-tools
STATICCHECK_VERSION: 2023.1.7
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
cache: true
check-latest: true
go-version-file: go.mod
- name: Install staticcheck
run: go install "honnef.co/go/tools/cmd/staticcheck@$STATICCHECK_VERSION"
- name: Run pre-commit
uses: nikaro/actions/pre-commit@fdbf26a2c9512b5e617ae65fa77a3f92c1598a56 # 1.3.21
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
cache: true
check-latest: true
go-version-file: go.mod
- name: Build
run: go build -v .
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
cache: true
check-latest: true
go-version-file: go.mod
- name: Test
run: make test