Add img postgres, configuração do DB com vars de ambiente e dj e decoupe #26
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: Django CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16.3 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
ports: [ '5432:5432' ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Instalação de Dependências (com Poetry) | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install poetry | |
poetry install --with dev --sync | |
- name: Lint | |
run: poetry run task lint | |
- name: Copy env-sample for .env | |
run: cp config/.env-sample .env | |
- name: Rodar testes do Django com cobertura | |
run: poetry run pytest devpro --cov=devpro --cov-fail-under=82 | |