-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.31 KB
/
testes.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 }}