File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Build CI/CD
22
33on :
4- push :
5- branches :
6- - main
4+ push :
5+ branches :
6+ - main
77
88jobs :
9- test :
10- runs-on : ubuntu-latest
11- steps :
12- - name : Checkout code
13- uses : actions/checkout@v4
14-
15- - name : Set up Go
16- uses : actions/setup-go@v5
17- with :
18- go-version : ' 1.22'
19-
20- - name : Install dependencies
21- run : go mod download
22-
23- - name : Run tests
24- run : go test ./...
25-
26- compile :
27- runs-on : ubuntu-latest
28- needs : test
29- if : success()
30- steps :
31- - name : Checkout code
32- uses : actions/checkout@v4
33-
34- - name : Set up Go
35- uses : actions/setup-go@v5
36- with :
37- go-version : ' 1.22'
38-
39- - name : Install dependencies
40- run : go mod download
41-
42- - name : Compile binary
43- run : go build -o myapp
9+ test :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v4
14+
15+ - name : Set up Go
16+ uses : actions/setup-go@v5
17+ with :
18+ go-version : ' 1.22'
19+
20+ - name : Install dependencies
21+ run : go mod download
22+
23+ - name : Run tests
24+ run : go test ./...
25+
26+ compile :
27+ runs-on : ubuntu-latest
28+ needs : test
29+ if : success()
30+ steps :
31+ - name : Checkout code
32+ uses : actions/checkout@v4
33+
34+ - name : Set up Go
35+ uses : actions/setup-go@v5
36+ with :
37+ go-version : ' 1.22'
38+
39+ - name : Install dependencies
40+ run : go mod download
41+
42+ - name : Compile binary
43+ run : go build -o myapp
You can’t perform that action at this time.
0 commit comments