-
Notifications
You must be signed in to change notification settings - Fork 129
66 lines (56 loc) · 1.77 KB
/
Copy pathPython-CMD-check.yaml
File metadata and controls
66 lines (56 loc) · 1.77 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
on:
push:
paths:
- python-package/**
- .github/workflows/Python-CMD-check.yaml
branches:
- main
- master
- dev
pull_request:
paths:
- python-package/**
- .github/workflows/Python-CMD-check.yaml
branches:
- main
- master
- dev
name: Python-CMD-check
jobs:
Python-CMD-check:
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.python-version }}${{ matrix.extras != '' && format(', {0}', matrix.extras) || '' }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Check out geobr
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install dependencies
shell: bash
working-directory: python-package
run: uv sync --frozen
- name: Run tests with coverage
shell: bash
working-directory: python-package
run: |
uv run --with pytest-cov pytest -n 2 --cov=geobr --cov-report=xml --durations=10 -s ./tests -m "not network"
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
files: ./python-package/coverage.xml
flags: python
name: codecov-python