Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add GitHub Actions workflow for periodic Coverity Scan #1958

Closed
wants to merge 42 commits into from
Closed
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
71b181e
Initial setup
kinkie Nov 28, 2024
b923ea2
Disable non-tested jobs
kinkie Nov 28, 2024
acaa6f8
Try referencing secrets
kinkie Nov 28, 2024
0af2c63
Actually run the scan, possibly
kinkie Nov 28, 2024
5ddd261
Coverity: run scanning manually
kinkie Dec 6, 2024
3b41f14
secrets are not available in if context
kinkie Dec 6, 2024
0539a77
try hoisting env to top level
kinkie Dec 6, 2024
21e5a40
move if-condition to workflow step
kinkie Dec 6, 2024
6f91087
fix syntax
kinkie Dec 6, 2024
76350dc
explore how to pass secrets
kinkie Dec 6, 2024
1439c6c
fix secret name
kinkie Dec 6, 2024
8d5257e
output token
kinkie Dec 6, 2024
a2ce365
figure out if token are getting passed
kinkie Dec 6, 2024
e189c79
use shell expansion
kinkie Dec 6, 2024
46173c6
change parameter specification
kinkie Dec 7, 2024
c685d6f
use secrets.COVERITY_TOKEN
kinkie Dec 7, 2024
6db5f6a
try not specifying environment twice
kinkie Dec 7, 2024
5743b0e
ignore curl result
kinkie Dec 7, 2024
e9ec7ca
better secret existence test
kinkie Dec 7, 2024
f506fe3
try hoisting test to job level
kinkie Dec 7, 2024
45fb4c8
different syntax
kinkie Dec 7, 2024
c1a15f5
rename step
kinkie Dec 7, 2024
495045c
rename, make all steps conditional
kinkie Dec 7, 2024
f95ddc7
add comment
kinkie Dec 7, 2024
2787145
reenable all jobs
kinkie Dec 7, 2024
eed1bf0
Create scheduled workflow
kinkie Dec 7, 2024
7a8009e
restrict scheduled workflow to the squid project main repository
kinkie Dec 7, 2024
862c221
scheduled -> coverity-scan
kinkie Dec 8, 2024
8b78ccd
do not hide curl errors
kinkie Dec 8, 2024
2fe48ae
do not test for secrets existence
kinkie Dec 9, 2024
7632ec5
have curl return error on http error
kinkie Dec 9, 2024
49371fb
do not ignore curl errors
kinkie Dec 9, 2024
befbd41
do not test coverity secrets
kinkie Dec 9, 2024
96d056e
redo missing changes
kinkie Dec 9, 2024
555792e
document workflow
kinkie Dec 12, 2024
f23252f
add a white line
kinkie Dec 12, 2024
2c46242
update comment on requiring secrets
kinkie Dec 12, 2024
fbad708
change comment wording
kinkie Dec 12, 2024
482f3cf
Remove obsolete scheduled.yaml file
kinkie Dec 12, 2024
02dbd04
use extended options in call to tar
kinkie Dec 12, 2024
7dccbe1
configuration -> secrets
kinkie Dec 12, 2024
8ef113a
fixup: Removed trailing space
rousskov Dec 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/coverity-scan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Coverity Scan service terms limit analysis requests frequency,
# and the service runs analysis in the background. Thus, we submit
# default branch analysis requests on a schedule rather than testing PRs.

name: Coverity Scan

on:
schedule:
- cron: "42 3 * * 0" # once a week

# allows to run this workflow manually from the Actions tab
workflow_dispatch:
kinkie marked this conversation as resolved.
Show resolved Hide resolved

jobs:
coverity-scan:
name: Scan with Coverity
# only run the workflow on Squid's main repository
if: github.repository == 'squid-cache/squid'

runs-on: ubuntu-22.04

# this job relies on GitHub repository secrets containing
# username and password to access the Coverity Scan service
env:
coverity_user: ${{ secrets.COVERITY_USER }}
coverity_token: ${{ secrets.COVERITY_TOKEN }}

container:
image: squidcache/buildfarm-coverity:stable
rousskov marked this conversation as resolved.
Show resolved Hide resolved
options: --user 1001 # uid used by worfklow runner

steps:
- name: Checkout Sources
uses: actions/checkout@v4

- name: Prepare and upload sources to Coverity Scan
run: |
cov-build --dir cov-int ./test-builds.sh layer-02-maximus
tar -c -a -f cov-int.tar.xz cov-int
curl \
--fail-with-body \
--form email=${coverity_user} \
--form token=${coverity_token} \
--form version=coverity_scan \
--form [email protected] \
https://scan.coverity.com/builds?project=Squid