File tree Expand file tree Collapse file tree 3 files changed +99
-0
lines changed
Expand file tree Collapse file tree 3 files changed +99
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ - package-ecosystem : " gomod"
4+ directory : " /"
5+ schedule :
6+ interval : " daily"
7+
8+ - package-ecosystem : " github-actions"
9+ directory : " /"
10+ schedule :
11+ interval : " daily"
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+ ci :
11+ name : CI
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Check out code
16+ uses : actions/checkout@v4
17+
18+ - name : Cache Go modules
19+ uses : actions/cache@v3
20+ with :
21+ path : |
22+ ~/.cache/go-build
23+ ~/go/pkg/mod
24+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
25+ restore-keys : |
26+ ${{ runner.os }}-go-
27+
28+ - name : Set up Go
29+ uses : actions/setup-go@v4
30+ with :
31+ go-version-file : ' go.mod'
32+
33+ - name : Check formatting
34+ run : |
35+ if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
36+ echo "Code is not formatted. Please run 'gofmt -s -w .'"
37+ gofmt -s -l .
38+ exit 1
39+ fi
40+
41+ - name : Run go vet
42+ run : go vet ./...
43+
44+ - name : Run tests
45+ run : go test ./...
46+
47+ - name : Build
48+ run : go build -v ./...
Original file line number Diff line number Diff line change 1+ name : CodeQL
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
8+ schedule :
9+ - cron : ' 0 6 * * 1'
10+
11+ jobs :
12+ analyze :
13+ name : Analyze
14+ runs-on : ubuntu-latest
15+ permissions :
16+ actions : read
17+ contents : read
18+ security-events : write
19+
20+ strategy :
21+ fail-fast : false
22+ matrix :
23+ language : [ 'go' ]
24+
25+ steps :
26+ - name : Checkout repository
27+ uses : actions/checkout@v4
28+
29+ - name : Initialize CodeQL
30+ uses : github/codeql-action/init@v3
31+ with :
32+ languages : ${{ matrix.language }}
33+
34+ - name : Autobuild
35+ uses : github/codeql-action/autobuild@v3
36+
37+ - name : Perform CodeQL Analysis
38+ uses : github/codeql-action/analyze@v3
39+ with :
40+ category : " /language:${{matrix.language}}"
You can’t perform that action at this time.
0 commit comments