Skip to content

Commit 2527fcb

Browse files
committed
github action
1 parent 54cb3e7 commit 2527fcb

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/go.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test
2+
on: [push, pull_request]
3+
4+
jobs:
5+
lint:
6+
name: Lint
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 5
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0 # Required for golangci-lint to analyze changes
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: '1.24.x' # Match test-cache for consistency
19+
cache: true # Cache Go modules
20+
21+
- name: Run golangci-lint
22+
uses: golangci/golangci-lint-action@v8
23+
with:
24+
version: v2.1.6 # Latest stable v2 release as of May 2025
25+
only-new-issues: true # Show only new issues on PRs
26+
27+
test-nocache:
28+
name: Test (No Cache)
29+
strategy:
30+
matrix:
31+
go-version: [1.23.x, 1.24.x]
32+
os: [ubuntu-latest, macos-latest, windows-latest]
33+
runs-on: ${{ matrix.os }}
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: actions/setup-go@v5
37+
with:
38+
go-version: ${{ matrix.go-version }}
39+
cache: false
40+
- run: go test ./...

0 commit comments

Comments
 (0)