Skip to content

Commit a9158fd

Browse files
author
BoxBoxJason
committed
ci: add go lint & test workflow
1 parent ee39ab5 commit a9158fd

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/go.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: lint-test
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
golangci-lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-go@v5
17+
with:
18+
go-version: stable
19+
- name: golangci-lint
20+
uses: golangci/golangci-lint-action@v7
21+
with:
22+
version: v2.0
23+
continue-on-error: true
24+
25+
26+
gosec:
27+
runs-on: ubuntu-latest
28+
env:
29+
GO111MODULE: on
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Run Gosec Security Scanner
33+
uses: securego/gosec@master
34+
with:
35+
args: ./...
36+
continue-on-error: true
37+
38+
39+
gotestsum:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Check out code
43+
uses: actions/checkout@v4
44+
45+
- name: Set up Go
46+
uses: actions/setup-go@v5
47+
with:
48+
go-version: '1.23.7'
49+
50+
- name: go-test
51+
run: |
52+
go test -v ./...

0 commit comments

Comments
 (0)