-
-
Notifications
You must be signed in to change notification settings - Fork 5
35 lines (32 loc) · 1.08 KB
/
python-tests.yml
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
name: Python tests
on:
pull_request:
branches: [main]
jobs:
python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
# Install a specific uv version using the installer
run: curl -LsSf https://astral.sh/uv/0.3.3/install.sh | sh
- name: Install the project
run: uv sync --all-extras --dev
- name: Linting
run: |
uv run mypy itscalledsoccer
uv run ruff check itscalledsoccer
- name: Run Pytest and generate coverage file
run: |
uv run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=itscalledsoccer tests/ | tee pytest-coverage.txt
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}