Skip to content

Commit 4390303

Browse files
committed
add workflow
1 parent 55619bf commit 4390303

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/lint.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Go Lint
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v4
18+
with:
19+
go-version: "1.21" # You can adjust this to your project's Go version
20+
21+
- name: Install golangci-lint
22+
run: |
23+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
24+
golangci-lint --version
25+
26+
- name: Run golangci-lint
27+
run: golangci-lint run --timeout=5m

0 commit comments

Comments
 (0)