doc regressão pratica parte 1 #43
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: Unit Testes | |
on: | |
push: | |
branches: [ "*" ] | |
pull_request: | |
branches: [ "*" ] | |
jobs: | |
pytest: | |
name: ${{ matrix.python-version }} on ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] # versões que recebem suporte oficial do Python, | |
# que possuem os recursos de typing que eu preciso para obrigar_tipos | |
# 3.13 não incluída pois o pint ainda não suporta ela | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: pip install poetry | |
- name: Install dependencies | |
run: poetry install --without docs | |
- name: Testing code with pytest | |
run: poetry run pytest -vv -x -s --cov LabIFSC2/ --no-cov-on-fail --cov-branch --cov-report=xml | |
- name: Mypy | |
run: poetry run python -m mypy LabIFSC2/ | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |