Commit 1dc77ce
authored
Restore Coverity Scan static analysis as a GitHub Actions workflow (#557)
## What this does
The Coverity Scan static analysis used to run from the Travis CI build
matrix (the `COVERITY_SCAN_*` job in `.travis.yml`). Travis is gone, so
the analysis stopped running even though the Coverity project at
https://scan.coverity.com/projects/srombauts-sqlitecpp and its README
badge are still there.
This adds a dedicated GitHub Actions workflow
(`.github/workflows/coverity.yml`) that brings it back. It uses the
official `vapier/coverity-scan-action`, which downloads the Coverity
build tool, compiles the library through `cov-build`, and uploads the
result to the same project.
## How it runs
- On pushes to `master` and on manual `workflow_dispatch`.
- Only in the upstream `SRombauts/SQLiteCpp` repository, guarded by an
`if` on `github.repository`, because the secret token is not readable
from forks.
- The build is configured with tests and examples off, since the
analysis only needs the library to compile.
## One setup step before it works
The workflow reads the project token from a repository secret named
`COVERITY_SCAN_TOKEN`. The old Travis job stored the same token
encrypted in `.travis.yml`, so that ciphertext cannot be reused here.
To enable the workflow, add the token under **Settings -> Secrets and
variables -> Actions -> New repository secret**:
- Name: `COVERITY_SCAN_TOKEN`
- Value: the project token from the Coverity **Project Settings** tab.
The notification email is set to `sebastien.rombauts@gmail.com` in the
workflow, matching the old Travis config. Until the secret is added, the
job fails at the upload step with an authentication error and nothing
else is affected.
## Notes
- `.travis.yml` is left untouched; this PR only adds the GitHub Actions
equivalent.
- Added a CHANGELOG entry under the open 3.4.0 section.2 files changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
0 commit comments