spack audit: allow skipping version checks from package.py (#28372)

A few packages have version directives evaluated
within if statements, conditional on the value of
`platform.platform()`.

Sometimes there are no cases for e.g. platform=darwin and that
causes a lot of spurious failures with version existence
audits.

This PR allows expressing conditions to skip version
existence checks in audits and avoid these spurious reports.
This commit is contained in:
Massimiliano Culpo
2023-07-13 12:47:47 +02:00
committed by GitHub
parent 161b30a32f
commit 3261889e3a
10 changed files with 31 additions and 5 deletions

View File

@@ -17,7 +17,10 @@ concurrency:
jobs:
# Run audits on all the packages in the built-in repository
package-audits:
runs-on: ubuntu-latest
runs-on: ${{ matrix.operating_system }}
strategy:
matrix:
operating_system: ["ubuntu-latest", "macos-latest"]
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # @v2
- uses: actions/setup-python@bd6b4b6205c4dbad673328db7b31b7fab9e241c0 # @v2
@@ -41,4 +44,4 @@ jobs:
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # @v2.1.0
if: ${{ inputs.with_coverage == 'true' }}
with:
flags: unittests,linux,audits
flags: unittests,audits