-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (73 loc) · 2.2 KB
/
Copy pathci.yml
File metadata and controls
93 lines (73 loc) · 2.2 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on:
push:
branches: [master]
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint & type-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: "3.12"
enable-cache: true
- name: Sync dev environment
run: uv sync --all-extras --group dev
- name: Ruff lint
run: uv run ruff check src/topo
- name: Ruff format check
run: uv run ruff format --check src/topo
docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: "3.12"
enable-cache: true
- name: Sync docs environment
run: uv sync --group docs
- name: Build docs
run: uv run zensical build
test:
name: Test py${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v7
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-suffix: py${{ matrix.python-version }}
- name: Sync test environment
run: uv sync --all-extras --group dev
- name: Check UMAP dependency
run: uv run python -c "import umap; from umap.umap_ import fuzzy_simplicial_set"
- name: Run tests
run: uv run pytest --cov=topo --cov-report=xml
- name: Smoke-test minimal-core install
run: |
uv venv /tmp/core-env --python ${{ matrix.python-version }}
uv pip install --python /tmp/core-env/bin/python .
/tmp/core-env/bin/python -c "import topo; print('core import OK', topo.__version__)"
- name: Upload coverage
if: matrix.python-version == '3.12'
uses: actions/upload-artifact@v6
with:
name: coverage-xml
path: coverage.xml