Merge pull request #1 from trelovodracir/feature/teste-automatizado-tdd #2
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: Python CI | |
# Dispara o workflow em eventos como push ou pull request na branch main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
# Sistema operacional onde os testes serão executados | |
runs-on: ubuntu-latest | |
steps: | |
# Passo 1: Checkout do código do repositório | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Passo 2: Configurar o Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12.7' # Versão do Python usada | |
# Passo 3: Instalar dependências | |
- name: Install dependencies | |
run: | | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# Passo 4: Rodar testes | |
- name: Run tests | |
run: | | |
python -m unittest discover tests |