Skip to content

Commit 208557a

Browse files
committed
Add Coverity Scan Github Action
WE2-539, WE2-785 Signed-off-by: Raul Metsma <[email protected]>
1 parent bc90006 commit 208557a

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/coverity.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Coverity Scan
2+
3+
on:
4+
push:
5+
branches: [coverity_scan]
6+
7+
jobs:
8+
coverity:
9+
if: github.repository == 'web-eid/web-eid-authtoken-validation-php'
10+
runs-on: ubuntu-latest
11+
env:
12+
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
13+
PROJECTNAME: 'web-eid/web-eid-authtoken-validation-php'
14+
steps:
15+
- uses: actions/checkout@v5
16+
- name: Download Coverity Build Tool
17+
run: |
18+
curl --silent --data "token=$TOKEN&project=$PROJECTNAME" -o cov-analysis-linux64.tar.gz https://scan.coverity.com/download/linux64
19+
mkdir cov-analysis-linux64
20+
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
21+
22+
- name: Build
23+
run: |
24+
export PATH=$PWD/cov-analysis-linux64/bin:$PATH
25+
coverity capture --dir cov-int --project-dir .
26+
27+
- name: Submit the result to Coverity Scan
28+
run: |
29+
tar czvf upload.tgz cov-int
30+
curl --silent \
31+
--form project=$PROJECTNAME \
32+
--form token=$TOKEN \
33+
34+
35+
--form version=master \
36+
--form description="Github Actions CI build" \
37+
https://scan.coverity.com/builds?project=$PROJECTNAME

0 commit comments

Comments
 (0)