-
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (35 loc) · 1.04 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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "master", "main", $default-branch ]
pull_request:
branches: [ "master", "main", $default-branch ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: '1.22'
- name: Go Vet
run: go vet ./...
- uses: dominikh/staticcheck-action@v1.3.1
with:
version: "latest"
install-go: false
- name: Go StaticCheck
run: go vet ./...
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...