Skip to content

Commit

Permalink
fix: experiment with different if construction
Browse files Browse the repository at this point in the history
  • Loading branch information
terriko committed Oct 24, 2023
1 parent 774cf95 commit 02fe642
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,16 @@ jobs:
tests:
name: Linux tests
if: |
! github.event.pull_request.user.login == 'github-actions[bot]' ||
env:
RUN_TESTS: ${{ ! github.event.pull_request.user.login == 'github-actions[bot]' ||
! (
startsWith(github.head_ref, 'chore-sbom-py') ||
contains(
fromJSON('["chore-update-table","chore-precommit-config","chore-spdx-header"]'),
github.head_ref
)
)
}}
runs-on: ubuntu-22.04
strategy:
matrix:
Expand Down Expand Up @@ -109,6 +110,7 @@ jobs:
- name: Install OS dependencies for testing PDF
run: sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev
- name: Install pdftotext, reportlab and cve-bin-tool
if: $RUN_TESTS
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
Expand All @@ -118,11 +120,13 @@ jobs:
python -m pip install --upgrade -r dev-requirements.txt
python -m pip install --upgrade .
- name: Try single CLI run of tool
if: $RUN_TESTS
run: |
[[ -e cache ]] && mkdir -p .cache && mv cache ~/.cache/cve-bin-tool
NO_EXIT_CVE_NUM=1 python -m cve_bin_tool.cli test/assets/test-kerberos-5-1.15.1.out
cp -r ~/.cache/cve-bin-tool cache
- name: Run async tests
if: $RUN_TESTS
run: >
pytest -n 4 -v
--ignore=test/test_cli.py
Expand All @@ -131,6 +135,7 @@ jobs:
--ignore=test/test_html.py
--ignore=test/test_json.py
- name: Run synchronous tests
if: $RUN_TESTS
run: >
pytest -v
test/test_cli.py
Expand Down

0 comments on commit 02fe642

Please sign in to comment.