File tree Expand file tree Collapse file tree 3 files changed +54
-1
lines changed
Expand file tree Collapse file tree 3 files changed +54
-1
lines changed Original file line number Diff line number Diff line change 1616# under the License.
1717
1818name : Test-Build
19+ permissions :
20+ contents : read
1921
2022on : [push, pull_request]
2123
3840 - name : Run Script
3941 run : make test
4042
43+ - name : Upload coverage to Codecov
44+ uses : codecov/codecov-action@v5
45+ with :
46+ token : ${{ secrets.CODECOV_TOKEN }}
47+ file : coverage.txt
Original file line number Diff line number Diff line change 1+ # Licensed to the Apache Software Foundation (ASF) under one
2+ # or more contributor license agreements. See the NOTICE file
3+ # distributed with this work for additional information
4+ # regarding copyright ownership. The ASF licenses this file
5+ # to you under the Apache License, Version 2.0 (the
6+ # "License"); you may not use this file except in compliance
7+ # with the License. You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing,
12+ # software distributed under the License is distributed on an
13+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+ # KIND, either express or implied. See the License for the
15+ # specific language governing permissions and limitations
16+ # under the License.
17+
18+ name : CodeQL Analysis
19+ on :
20+ push :
21+ branches : [main]
22+ pull_request :
23+ branches : [main]
24+ permissions :
25+ actions : read
26+ contents : read
27+ security-events : write
28+ jobs :
29+ codeql :
30+ name : CodeQL
31+ runs-on : ubuntu-latest
32+ strategy :
33+ fail-fast : false
34+ matrix :
35+ language : ["actions", "go"]
36+ steps :
37+ - name : Checkout repository
38+ uses : actions/checkout@v6
39+ - name : Initialize CodeQL
40+ uses : github/codeql-action/init@v4
41+ with :
42+ languages : ${{ matrix.language }}
43+ - name : Autobuild
44+ uses : github/codeql-action/autobuild@v4
45+ - name : Perform CodeQL Analysis
46+ uses : github/codeql-action/analyze@v4
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ cloudstack-ccm: ${CMD_SRC}
4343 go build -ldflags ${LDFLAGS} -o $@ $^
4444
4545test : gofmt
46- go test -v
46+ go test -v -coverprofile=coverage.txt -covermode=atomic
4747 go vet
4848
4949docker : gofmt
You can’t perform that action at this time.
0 commit comments