.github/workflows/automatizacao.yml
name: teste-unitario-automatizado
on: # Quando o usuário realizar um push, será feito os testes
push:
pull_request:
schedule: [{cron: "0 0 * * *"}] #toda meia noite sera realizado os testes
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install --upgrade pip
- name: Test with pytest
run: | # Vai realizar os testes
pip install pytest
pip install pytest-cov
pip install tqdm
pip install certifik8
pytest --cov-config=.coveragerc --cov=Certifik8
- name: Generate Coverage Report
run: |
coverage xml
- name: Upload Code Climate
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.TEST_REPORTER_ID }}
with:
coverageCommand: coverage report