File tree Expand file tree Collapse file tree 1 file changed +85
-0
lines changed
Expand file tree Collapse file tree 1 file changed +85
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+
9+ jobs :
10+ test :
11+ name : Test and Lint
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Set up Go
17+ uses : actions/setup-go@v4
18+ with :
19+ go-version : ' 1.23.0'
20+
21+ - name : Cache Go modules
22+ uses : actions/cache@v4
23+ with :
24+ path : |
25+ ~/.cache/go-build
26+ ~/go/pkg/mod
27+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
28+ restore-keys : |
29+ ${{ runner.os }}-go-
30+
31+ - name : Install dependencies
32+ run : make deps
33+
34+ - name : Run checks (lint, vet, fmt-check, test)
35+ run : make check
36+
37+ - name : Run security scan
38+ run : make security
39+ continue-on-error : true
40+
41+ - name : Run tests with coverage
42+ run : make test-coverage
43+
44+ - name : Upload coverage reports
45+ uses : actions/upload-artifact@v4
46+ with :
47+ name : coverage-report
48+ path : coverage/
49+
50+ build :
51+ name : Cross-platform Build
52+ runs-on : ubuntu-latest
53+ needs : test
54+ strategy :
55+ matrix :
56+ target : [linux, darwin, windows]
57+ steps :
58+ - uses : actions/checkout@v4
59+
60+ - name : Set up Go
61+ uses : actions/setup-go@v4
62+ with :
63+ go-version : ' 1.23.0'
64+
65+ - name : Cache Go modules
66+ uses : actions/cache@v4
67+ with :
68+ path : |
69+ ~/.cache/go-build
70+ ~/go/pkg/mod
71+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
72+ restore-keys : |
73+ ${{ runner.os }}-go-
74+
75+ - name : Install dependencies
76+ run : make deps
77+
78+ - name : Build for ${{ matrix.target }}
79+ run : make build-${{ matrix.target }}
80+
81+ - name : Upload build artifacts
82+ uses : actions/upload-artifact@v4
83+ with :
84+ name : build-${{ matrix.target }}
85+ path : build/
You can’t perform that action at this time.
0 commit comments