File tree Expand file tree Collapse file tree 2 files changed +58
-32
lines changed Expand file tree Collapse file tree 2 files changed +58
-32
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+ on : [push, pull_request]
3+ jobs :
4+ go_lint :
5+ name : Go lint
6+ runs-on : ubuntu-latest
7+ steps :
8+ - uses : actions/checkout@v2
9+ - name : golangci-lint
10+ uses : golangci/golangci-lint-action@v2
11+ with :
12+ working-directory : check-commit
13+ check_commit :
14+ if : ${{ github.event_name == 'pull_request' }}
15+ name : HAProxy check commit message
16+ runs-on : ubuntu-latest
17+ steps :
18+ - uses : actions/checkout@v2
19+ with :
20+ fetch-depth : 0
21+ - name : check-commit
22+ uses : docker://haproxytech/check-commit:latest
23+ env :
24+ API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
25+ go_build :
26+ name : Go build
27+ runs-on : ubuntu-latest
28+ needs : ["go_lint"]
29+ steps :
30+ - name : Check out code into the Go module directory
31+ uses : actions/checkout@v2
32+ - name : Set up Go 1.17
33+ uses : actions/setup-go@v2
34+ with :
35+ go-version : 1.17
36+ id : go
37+ - name : Get dependencies
38+ run : |
39+ cd check-commit && go get -v -t -d ./...
40+ - name : Build
41+ run : |
42+ cd check-commit && go build -v .
43+ go_test :
44+ name : Go test
45+ runs-on : ubuntu-latest
46+ needs : ["go_lint"]
47+ steps :
48+ - uses : actions/checkout@v2
49+ - uses : actions/setup-go@v2
50+ with :
51+ go-version : 1.17
52+ id : go
53+ - name : Get dependencies
54+ run : |
55+ cd check-commit && go get -v -t -d ./...
56+ - name : Build
57+ run : |
58+ cd check-commit && go test ./...
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments