Skip to content

Commit 8fd3a65

Browse files
authored
Project scaffold and GitHub Actions CI (#1)
* Project scaffold: pyproject + package skeleton + README + LICENSE * Add GitHub Actions CI and the maintainer-scripts README
1 parent d0975d3 commit 8fd3a65

6 files changed

Lines changed: 798 additions & 13 deletions

File tree

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
# A push that obsoletes a previous run cancels it.
10+
concurrency:
11+
group: ci-${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
lint:
16+
name: ruff
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
cache: pip
24+
cache-dependency-path: pyproject.toml
25+
- run: pip install --upgrade pip
26+
- run: pip install ruff
27+
- run: ruff check .
28+
29+
test:
30+
name: pytest (py${{ matrix.python }})
31+
runs-on: ubuntu-latest
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
python: ["3.11", "3.12", "3.13"]
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: actions/setup-python@v5
39+
with:
40+
python-version: ${{ matrix.python }}
41+
cache: pip
42+
cache-dependency-path: pyproject.toml
43+
- run: pip install --upgrade pip
44+
# ``-e .[dev,plotting,excel]`` so every optional extra is exercised.
45+
# Gurobi is not installable on free runners; the relevant tests
46+
# skip themselves when ``optlang.gurobi_interface`` cannot import.
47+
- run: pip install -e ".[dev,plotting,excel]"
48+
- run: pytest -q --maxfail=5 --durations=20

0 commit comments

Comments
 (0)