update deps #148
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 | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- development | |
schedule: | |
# See https://crontab.guru/weekly every sunday at 00:00 | |
- cron: 0 0 * * 0 | |
jobs: | |
test: | |
name: Run Linting and Tests | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: password | |
POSTGRES_BD: appdb | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.11.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11.x | |
- name: Install poetry | |
run: | | |
python -m pip install --upgrade poetry wheel | |
- name: Install dependencies | |
run: | | |
cd src; | |
poetry config virtualenvs.create false && poetry install; | |
- name: Run Linting | |
run: | | |
cd src; | |
black --check --diff . ; | |
ruff --diff . ; | |
- name: Run Tests | |
env: | |
DATABASE_URL: postgresql+asyncpg://postgres:password@localhost:5432/appdb | |
EMAIL_FROM_ADDRESS: support@example.com | |
PYTHONUNBUFFERED: 1 | |
run: | | |
cd src; | |
pytest --asyncio-mode=auto; |