Criação da tela de achados #103
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
# Nome do workflow | |
name: CI/CD Workflow | |
# Definir quando o workflow será executado | |
on: | |
push: | |
branches: | |
- main # Executa o workflow ao push na branch 'main' | |
pull_request: | |
branches: | |
- main # Executa o workflow ao abrir um PR na branch 'main' | |
# Definindo os jobs | |
jobs: | |
# Job para rodar os testes | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# - name: Set up Docker Compose | |
# run: | | |
# docker-compose -f docker-compose.yml up -d --build | |
# - name: Run migrations | |
# run: | | |
# docker-compose exec web python manage.py migrate | |
# - name: Run tests with coverage | |
# run: | | |
# docker-compose exec web coverage run --source='.' manage.py test | |
# - name: Generate coverage report | |
# run: | | |
# docker-compose exec web coverage xml | |
# # Gera o relatório em XML, necessário para o Codecov | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v3 | |
# with: | |
# files: ./web/coverage.xml # Caminho do relatório XML gerado | |
# token: ${{ secrets.CODECOV_TOKEN }} # O token Codecov é armazenado nos secrets do GitHub | |
# flags: unittests | |
# name: Django Tests | |
# - name: Tear down Docker Compose | |
# if: always() | |
# run: | | |
# docker-compose down |