chore: ci fix #84
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: Test and Deploy | |
on: [push, pull_request] | |
jobs: | |
run_infrastructure_validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.7.0 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root --with dev | |
- name: Code Quality | |
run: poetry run black . --check && poetry run flake8 | |
- name: Unit Tests | |
run: | | |
export POSTGRES_PASSWORD=dummy | |
export POSTGRES_USER=dummy | |
export JWT_SECRET_KEY=dummy | |
export ADMIN_PASSWORD=dummy | |
export API_KEY=dummy | |
poetry run pytest -vv --cov-report term-missing --cov-branch --cov=src |