33 bundles #302
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: Python application - API Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
name: Python ${{ matrix.python-version }} sample | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout pysec submodule only | |
run: | | |
git submodule init vulnerabilitylookup/feeders/pysec | |
git submodule update vulnerabilitylookup/feeders/pysec | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{matrix.python-version}} | |
cache: 'poetry' | |
- name: Cache kvrocks | |
id: kvrocks | |
uses: actions/cache@v4 | |
with: | |
path: ../kvrocks | |
key: ${{ runner.os }}-kvrocks | |
- name: Clone Kvrocks | |
uses: actions/checkout@v4 | |
with: | |
repository: apache/kvrocks | |
path: kvrocks-tmp | |
ref: 2.7 | |
submodules: true | |
- name: Install kvrocks | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc g++ make libsnappy-dev autoconf automake libtool libgtest-dev | |
mv kvrocks-tmp ../kvrocks | |
pushd .. | |
pushd kvrocks | |
./x.py build | |
popd | |
popd | |
- name: Clone Redis | |
uses: actions/checkout@v4 | |
with: | |
repository: redis/redis | |
path: redis-tmp | |
ref: 7.2 | |
- name: Install and setup redis | |
run: | | |
mv redis-tmp ../redis | |
pushd .. | |
pushd redis | |
make | |
popd | |
popd | |
- name: Install with poetry | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry install | |
echo VULNERABILITYLOOKUP_HOME=`pwd` > .env | |
- name: Clone PyVulnerabilityLookup | |
uses: actions/checkout@v4 | |
with: | |
repository: cve-search/PyVulnerabilityLookup | |
path: PyVulnerabilityLookup | |
- name: Run API tests | |
run: | | |
cp config/website.py.sample config/website.py | |
poetry run run_backend --start | |
poetry run pysec_importer & | |
poetry run start_website & | |
sleep 30 | |
pushd PyVulnerabilityLookup | |
poetry install | |
poetry run pytest tests/test_web.py | |
popd | |
poetry run stop |