-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.05 KB
/
Copy pathgo.yaml
File metadata and controls
40 lines (36 loc) · 1.05 KB
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
name: Test
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for golangci-lint to analyze changes
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24.x' # Match test-cache for consistency
cache: true # Cache Go modules
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v8
with:
version: v2.1.6 # Latest stable v2 release as of May 2025
only-new-issues: true # Show only new issues on PRs
test-nocache:
name: Test (No Cache)
strategy:
matrix:
go-version: [1.23.x, 1.24.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- run: go test ./...