Repository navigation
47 lines (41 loc) · 1.47 KB
/
Copy pathtest.yml
File metadata and controls
47 lines (41 loc) · 1.47 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
name: tests
on:
push:
branches: [master, main]
pull_request:
# Cancel in-progress runs of this workflow on the same ref when a new
# push lands; saves runner minutes on rapid iteration.
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
name: pytest (${{ matrix.os }}, py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Full Python range on Linux; a single Python on macOS/Windows to catch
# OS-specific issues at low runner cost.
os: [ubuntu-latest]
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
include:
- { os: macos-latest, python-version: "3.12" }
- { os: windows-latest, python-version: "3.12" }
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
# swiglpk (a cobra/optlang dependency) publishes no Python 3.15 wheel, so pip
# builds it from source, which needs the GLPK headers and SWIG.
- name: Install GLPK build dependencies
if: matrix.python-version == '3.15'
run: sudo apt-get update && sudo apt-get install -y libglpk-dev swig
- name: Install
run: pip install -e ".[dev,evotune]"
- name: Run pytest
run: pytest -q