File tree Expand file tree Collapse file tree 2 files changed +5
-83
lines changed
Expand file tree Collapse file tree 2 files changed +5
-83
lines changed Original file line number Diff line number Diff line change 1- name : Go CI
1+ name : Go
22
33on :
44 push :
99jobs :
1010 build-and-test :
1111 runs-on : ubuntu-latest
12-
1312 steps :
1413 - name : Checkout code
1514 uses : actions/checkout@v4
1615
1716 - name : Set up Go
1817 uses : actions/setup-go@v5
1918 with :
20- go-version : ' 1.22'
21- cache : true # enables module caching for faster builds
22-
23- - name : Verify dependencies
24- run : go mod tidy && git diff --exit-code go.mod go.sum
19+ go-version : ' 1.22' # Adjust to match your go.mod
2520
26- - name : Build
27- run : go build -v ./...
21+ - name : Install dependencies
22+ run : go mod tidy
2823
2924 - name : Run tests
30- run : go test -v ./... -coverprofile=coverage.out
31-
32- - name : Upload coverage
33- uses : actions/upload-artifact@v4
34- with :
35- name : coverage
36- path : coverage.out
37-
38- lint :
39- runs-on : ubuntu-latest
40- steps :
41- - name : Checkout code
42- uses : actions/checkout@v4
43-
44- - name : Set up Go
45- uses : actions/setup-go@v5
46- with :
47- go-version : ' 1.22'
48-
49- - name : Install golangci-lint
50- run : |
51- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
52- | sh -s -- -b $(go env GOPATH)/bin latest
53-
54- - name : Run linter
55- run : golangci-lint run ./...
25+ run : go test -v ./...
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments