Update test cases #204
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Run Test Cases' | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout search_vulns code | |
uses: actions/checkout@v4 | |
- name: Check if code for building resources was changed | |
uses: dorny/paths-filter@v3 | |
id: changes | |
with: | |
filters: | | |
db_build_code_changed: | |
- 'db_build/**' | |
- name: Set up Python and Pip | |
uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
python-version: '3.10' | |
- name: Upgrade Pip | |
run: python3 -m pip install --upgrade pip | |
- name: Install tool and build resources from source | |
if: steps.changes.outputs.db_build_code_changed == 'true' | |
env: | |
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
VULNCHECK_API_KEY: ${{ secrets.VULNCHECK_API_KEY }} | |
run: NVD_API_KEY=$NVD_API_KEY VULNCHECK_API_KEY=$VULNCHECK_API_KEY ./install.sh --full | |
- name: Install tool and pull resources from release | |
if: steps.changes.outputs.db_build_code_changed == 'false' | |
run: | | |
pip3 install -r requirements.txt | |
git submodule init | |
git submodule update | |
./search_vulns.py -u | |
- name: Test CVE Completeness | |
run: python3 ./tests/test_cve_completeness.py | |
- name: Test CVE Attribute Completeness | |
run: python3 ./tests/test_cve_attr_completeness.py | |
- name: Test Exploit Completeness | |
run: python3 ./tests/test_exploit_completeness.py | |
- name: Test Version Comparison Correctness | |
run: python3 ./tests/test_version_comparison.py | |
- name: Test endoflife.date Correctness | |
run: python3 ./tests/test_eol_date.py |