chg: [website] API - for the sightings of type confirmed we can fetch… #297
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: Models Tests | |
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: Setup PostgreSQL | |
uses: Harmon758/[email protected] | |
with: | |
postgresql db: 'vulnlookuptest' | |
postgresql user: 'postgres' | |
postgresql password: 'password' | |
- name: Install with poetry | |
run: | | |
python -m pip install --upgrade pip poetry | |
poetry install --with dev | |
echo VULNERABILITYLOOKUP_HOME=`pwd` > .env | |
- name: Run Models tests | |
run: | | |
cp config/website.py.sample config/website.py | |
poetry run flask --app website.app db_init | |
poetry run flask --app website.app db stamp head | |
sleep 3 | |
poetry run pytest tests/test_user.py | |
env: | |
TESTING: gh_action |