Publish version 0.4.12 #35
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@v3 | |
- name: Check if code for building resources was changed | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
db_build_code_changed: | |
- 'db_creation_src/**' | |
- 'updater.py' | |
- name: Set up Python and Pip | |
uses: actions/setup-python@v4 | |
with: | |
cache: 'pip' | |
python-version: '3.8' | |
- 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 }} | |
run: NVD_API_KEY=$NVD_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 Related Queries Functionality | |
run: python3 ./tests/test_related_queries.py |