-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (34 loc) · 979 Bytes
/
Copy pathci.yml
File metadata and controls
42 lines (34 loc) · 979 Bytes
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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
env:
MPLBACKEND: Agg
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Cache numba compilation
uses: actions/cache@v4
with:
path: |
openpopcon/__pycache__
~/.cache/numba
key: numba-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('openpopcon/core.py', 'openpopcon/lib/phys_lib.py', 'openpopcon/lib/openpopcon_util.py', 'pyproject.toml') }}
- name: Install project and test dependencies
run: uv sync --extra test --python ${{ matrix.python-version }}
- name: Run tests
run: uv run pytest