-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (51 loc) · 1.43 KB
/
tests.yml
File metadata and controls
60 lines (51 loc) · 1.43 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
name: Tests
on:
pull_request:
merge_group:
push:
branches: [main, test]
jobs:
pre-commit:
name: Lint
uses: tskit-dev/.github/.github/workflows/lint.yml@v2
test:
name: Python
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python: [ "3.10", 3.13 ]
os: [ macos-latest, ubuntu-24.04, windows-latest ]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4.2.2
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python }}
version: "0.8.15"
- name: Install dependencies
run: |
uv venv
uv pip install -r pyproject.toml --extra test
- name: Run tests
run: |
NUMBA_DISABLE_JIT=1 uv run --no-sync python -m pytest -vv --cov=tsdate --cov-report=xml --cov-branch -n0 tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5.4.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
flags: python-tests
name: codecov-umbrella
verbose: true
- name: Build distribution
run: |
uv run --no-sync python -m build