-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (43 loc) · 1.29 KB
/
Copy pathpython-tests.yml
File metadata and controls
52 lines (43 loc) · 1.29 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
name: Test package
on:
push:
branches: [main]
pull_request:
branches:
- main
- dev
workflow_dispatch:
# A new push to a PR supersedes the run already in flight for that ref, so a
# wedged job cannot sit on a runner while its replacement queues behind it.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
os:
- "ubuntu-latest"
- "windows-latest"
- "macos-latest"
runs-on: ${{matrix.os}}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
# No uv.lock is committed here (nor in any sibling ezmsg package),
# so keying the cache on it matches nothing and setup-uv fails outright.
cache-dependency-glob: "pyproject.toml"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras
- name: Lint
run:
uv tool run ruff check --output-format=github src
- name: Run tests
run: uv run pytest tests