✨ generating emails for account verification and reset password (#81) #139
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
POSTGRES_DB: app | |
POSTGRES_HOST: localhost:5432 | |
POSTGRES_USER: user | |
POSTGRES_PASSWORD: password | |
CORS_ORIGINS: http://127.0.0.1:8000 | |
JWT_SECRET_KEY: secret | |
SMTP_HOST: smtp.gmail.com | |
SMTP_PORT: 587 | |
SMTP_USER: random.user@gmail.com | |
SMTP_PASSWORD: random.password | |
EMAILS_FROM_EMAIL: random.user@gmail.com | |
FRONT_END_BASE_URL: http://localhost:3000 | |
PYTHONPATH: ./todos | |
jobs: | |
ci: | |
name: Setup | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_USER: user | |
POSTGRES_PASSWORD: password | |
POSTGRES_DB: app | |
ports: | |
- 5432:5432 | |
steps: | |
- name: Checkout working branch | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
working-directory: . | |
run: pip3 install -r requirements.txt | |
- name: Analysing the code with Pylint | |
working-directory: . | |
run: | | |
pip3 install pylint pylint-pydantic pylint_pytest_plugin pylint-exit | |
pylint todos || pylint-exit --fail-under=1 --error-fail $? | |
- name: Type checking the code with mypy | |
working-directory: . | |
run: | | |
pip3 install mypy sqlalchemy2-stubs | |
mypy . | |
- name: Analysing the code with Bandit | |
working-directory: . | |
run: | | |
pip3 install bandit | |
bandit -c bandit.yaml -r . | |
- name: Database migrations | |
working-directory: . | |
run: alembic upgrade head | |
- name: Test | |
run: | | |
pip3 install pytest pytest-asyncio pytest-lazy-fixture httpx 'asgi-lifespan==2.*' | |
pytest . |