Use postgres instead of sqlite for tests #5
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: Unit Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
container-job: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python3 | |
uses: actions/setup-python@v3 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip tox | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
tox -e py | |
env: | |
POSTGRES_HOST: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_PORT: 5432 | |
POSTGRES_DB: nodejsscan | |
SQLALCHEMY_DATABASE_URI: postgresql://postgres:postgres@postgres:5432/nodejsscan | |
- name: Clean Up | |
run: | | |
tox -e clean |