Use psycopg sql utils to avoid sql injection #11
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 Tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
DB_HOST: localhost | |
DB_PORT: 5432 | |
DB_NAME: mydatabase | |
DB_USER: myuser | |
DB_PASSWORD: mypassword | |
DB_TABLE_NAME: space2stats | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r space2stats_api/requirements.txt | |
- name: Set PYTHONPATH | |
run: echo "PYTHONPATH=$(pwd)/space2stats_api" >> $GITHUB_ENV | |
- name: Run tests | |
run: pytest space2stats_api/tests |