Skip to content

Commit

Permalink
ci: try another if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
terriko committed Dec 16, 2024
1 parent 4a4fc38 commit a081cf1
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,20 @@ jobs:
echo "sbom set to false"
fi
- name: "Hack for test groups"
env:
sync: $${{ matrix.testgroup == 'sync' }}
async: $${{ matrix.testgroup == 'async' }}
scanner: $${{ matrix.testgroup == 'scanner' }}
language: $${{ matrix.testgroup == 'language' }}
run: |
if ${sync} == true; then
echo "sync=1" >> $GITHUB_ENV
echo "async=0" >> $GITHUB_ENV
echo "scanner=0" >> $GITHUB_ENV
echo "language=0" >> $GITHUB_ENV
fi
- name: Get date
id: get-date
run: |
Expand Down Expand Up @@ -269,7 +283,7 @@ jobs:
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: env.sbom != 'true' && env.testgroup == 'async'
if: env.sbom != 'true' && env.async == 1
run: >
pytest --cov --cov-append -n 32 -v --durations=50
--ignore=test/test_cli.py
Expand All @@ -280,17 +294,17 @@ jobs:
--ignore=test/test_scanner.py
--ignore=test/test_language_parser.py
- name: Run language parser tests
if: env.sbom != 'true' && env.testgroup == 'language'
if: env.sbom != 'true' && env.language == 1
run: >
pytest --cov --cov-append -n 32 -v --durations=50
test/test_language_parser.py
- name: Run scanner tests
if: env.sbom != 'true' && env.testgroup == 'scanner'
if: env.sbom != 'true' && env.scanner == 1
run: >
pytest --cov --cov-append -n 32 -v --durations=50
test/test_scanner.py
- name: Run synchronous tests
if: env.sbom != 'true' && env.testgroup == 'sync'
if: env.sbom != 'true' && env.sync == 1
run: >
pytest -v --cov --cov-append --cov-report=xml --durations=50
test/test_cli.py
Expand Down

0 comments on commit a081cf1

Please sign in to comment.