File tree Expand file tree Collapse file tree 4 files changed +85
-193
lines changed Expand file tree Collapse file tree 4 files changed +85
-193
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+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.ref }}
11+ cancel-in-progress : true
12+
13+ env :
14+ GO_VERSION : ' 1.25'
15+
16+ jobs :
17+ test :
18+ name : Test
19+ runs-on : ubuntu-latest
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v5
23+
24+ - name : Set up Go
25+ uses : actions/setup-go@v5
26+ with :
27+ go-version : ${{ env.GO_VERSION }}
28+ cache : true
29+
30+ - name : Download dependencies
31+ run : go mod download
32+
33+ - name : Verify dependencies
34+ run : go mod verify
35+
36+ - name : Run tests
37+ run : go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
38+
39+ - name : Upload coverage to Codecov
40+ uses : codecov/codecov-action@v4
41+ with :
42+ files : ./coverage.out
43+ flags : unittests
44+ fail_ci_if_error : false
45+
46+ lint :
47+ name : Lint
48+ runs-on : ubuntu-latest
49+ steps :
50+ - name : Checkout code
51+ uses : actions/checkout@v5
52+
53+ - name : Set up Go
54+ uses : actions/setup-go@v5
55+ with :
56+ go-version : ${{ env.GO_VERSION }}
57+ cache : true
58+
59+ - name : Run golangci-lint
60+ uses : golangci/golangci-lint-action@v8
61+ with :
62+ version : latest
63+ args : --timeout=5m
64+
65+ build :
66+ name : Build
67+ runs-on : ubuntu-latest
68+ steps :
69+ - name : Checkout code
70+ uses : actions/checkout@v5
71+
72+ - name : Set up Go
73+ uses : actions/setup-go@v5
74+ with :
75+ go-version : ${{ env.GO_VERSION }}
76+ cache : true
77+
78+ - name : Build
79+ run : go build -v ./...
80+
81+ - name : Build binary
82+ run : go build -v -o kminion .
83+
Original file line number Diff line number Diff line change @@ -2,9 +2,9 @@ name: E2E Tests
22
33on :
44 push :
5- branches : ["master", " main"]
5+ branches : ["main"]
66 pull_request :
7- branches : ["master", " main"]
7+ branches : ["main"]
88 workflow_dispatch :
99
1010jobs :
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments