File tree Expand file tree Collapse file tree 4 files changed +84
-1
lines changed
Expand file tree Collapse file tree 4 files changed +84
-1
lines changed Original file line number Diff line number Diff line change 1717
1818name : Test-Build
1919
20+ permissions :
21+ contents : read
22+
2023on : [push, pull_request]
2124
2225concurrency :
3841 - name : Run Script
3942 run : make test
4043
44+ - name : Upload coverage to Codecov
45+ uses : codecov/codecov-action@v5
46+ with :
47+ token : ${{ secrets.CODECOV_TOKEN }}
48+ files : 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 11/cloudstack-ccm
22
3+ # Binaries for programs and plugins
4+ * .exe
5+ * .exe~
6+ * .dll
7+ * .so
8+ * .dylib
9+
10+ # Test binary, built with `go test -c`
11+ * .test
12+
13+ # Code coverage profiles and other test artifacts
14+ * .out
15+ coverage. *
16+ * .coverprofile
17+ profile.cov
18+
19+ # Dependency directories (remove the comment below to include it)
20+ # vendor/
21+
22+ # Go workspace file
23+ go.work
24+ go.work.sum
25+
26+ # env file
27+ .env
28+
29+ # Editor/IDE
30+ .idea /
31+ .vscode /
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