-
-
Notifications
You must be signed in to change notification settings - Fork 96
69 lines (61 loc) · 1.88 KB
/
Copy pathpythonpackage.yml
File metadata and controls
69 lines (61 loc) · 1.88 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
name: Test package
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.13", "3.14"]
installer: ["conda"]
include:
- os: "ubuntu-latest"
python-version: "3.15"
installer: "python"
- os: "windows-latest"
python-version: "3.15"
installer: "python"
steps:
- uses: actions/checkout@v5
- name: Set up Conda Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
if: matrix.installer == 'conda'
with:
environment-file: environment.yml
channels: conda-forge
channel-priority: strict
activate-environment: npf-dev
python-version: ${{ matrix.python-version }}
miniforge-version: latest
- name: Conda metadata
if: matrix.installer == 'conda'
run: |
conda info
conda list
- name: Set up Python.org Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
if: matrix.installer == 'python'
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- name: Install dependencies
if: matrix.installer == 'python'
run: |
# Unfortunately, no pip install --only-build-deps command yet,
# so we have to jump through some hoops.
pip install $(python -c 'import tomllib; print(" ".join(tomllib.load(open("pyproject.toml", "rb"))["build-system"]["requires"]))')
pip install --only-deps .[dev,test]
pip list
- name: Lint
run: |
spin lint
- name: Build project
run: |
spin build -v
- name: Test with pytest
run: |
spin test -- --doctest-modules