-
Notifications
You must be signed in to change notification settings - Fork 55
74 lines (74 loc) · 2.51 KB
/
coverity.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#name: coverity-scan
#on:
# workflow_dispatch: # because sometimes you just want to force a branch to have tests run
# push:
# branches:
# - main
# paths:
# - .github/workflows/coverity_scan.yml
# pull_request:
# branches:
# - "**"
# paths:
# - .github/workflows/coverity_scan.yml
# schedule:
# - cron: '0 18 * * *' # Daily at 18:00 UTC
#
#env:
# JAVA_VERSION: 17
# JAVA_DISTRIBUTION: 'zulu'
# NODE_VERSION: 18
#
#defaults:
# run:
# working-directory: ./backend
#
#jobs:
# scan:
# runs-on: ubuntu-latest
# if: ${{ github.actor != 'dependabot[bot]' }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/[email protected]
# with:
# node-version: ${{env.NODE_VERSION}}
# - name: Cache npm local files
# uses: actions/[email protected]
# with:
# path: |
# ./frontend/node_modules
# key: npm-${{env.NODE_VERSION}}-${{ hashFiles('frontend/yarn.lock', 'frontend/package.json') }}
# - name: Install dependencies
# run: yarn install
# working-directory: ./frontend
# - name: Set up JDK
# uses: actions/setup-java@v4
# with:
# java-version: ${{env.JAVA_VERSION}}
# distribution: ${{env.JAVA_DISTRIBUTION}}
# - name: Cache Java Dependencies
# uses: actions/[email protected]
# with:
# path: |
# ~/.gradle/caches
# ~/.gradle/wrapper
# key: gradle-build-${{ hashFiles('*.gradle', 'gradle/dependency-locks/*') }}
# - name: Download Coverity Build Tool
# run: |
# wget -q https://scan.coverity.com/download/java/linux64 --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=CDCgov/prime-simplereport" -O cov-analysis-linux64.tar.gz
# mkdir cov-analysis-linux64
# tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
# - name: Build with cov-build
# run: |
# export PATH=`pwd`/cov-analysis-linux64/bin:$PATH
# cov-build --dir cov-int --fs-capture-search ../frontend ./gradlew clean assemble
# - name: Submit the result to Coverity Scan
# run: |
# tar czvf sr.tgz cov-int
# curl \
# --form token=${{ secrets.COVERITY_TOKEN }} \
# --form [email protected] \
# --form [email protected] \
# --form version=${{ env.GITHUB_REF }} \
# --form description="`git rev-parse --short HEAD`" \
# https://scan.coverity.com/builds?project=CDCgov%2Fprime-simplereport