Skip to content

Commit 5307c33

Browse files
committed
build: Add golangci-lint to CI.
1 parent 3aad86b commit 5307c33

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/golangci-lint.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# This workflow uses actions that are not certified by GitHub. They are provided
3+
# by a third-party and are governed by separate terms of service, privacy
4+
# policy, and support documentation.
5+
6+
name: Golangci-lint
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
golangci_job:
20+
runs-on: ubuntu-latest
21+
name: Scan for issues
22+
steps:
23+
- name: Harden Runner
24+
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
25+
with:
26+
egress-policy: audit
27+
28+
- name: Checkout Source
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Install Go
34+
uses: actions/setup-go@v4
35+
with:
36+
go-version: '1.21'
37+
cache: true
38+
39+
- name: golangci-lint
40+
uses: golangci/golangci-lint-action@v3
41+
with:
42+
version: latest
43+
only-new-issues: true
44+
install-mode: goinstall

0 commit comments

Comments
 (0)