Pure python rewrite #305
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
tags: [v*] | |
pull_request: {} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run pre-commit linting | |
run: pipx run pre-commit run --all-files | |
test: | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
platform: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- python-version: "3.9" | |
platform: ubuntu-latest | |
- python-version: "3.13" | |
platform: ubuntu-latest | |
exclude: | |
# getting segfaults on _get_coefficients... | |
# probably related to the recursion limit | |
- python-version: "3.10" | |
platform: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v4 | |
with: | |
version: "0.5.10" | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
python-version: ${{ matrix.python-version }} | |
- name: add gurobi license | |
shell: bash | |
id: write-license | |
env: | |
LICENSE: ${{ secrets.GRB_LICENSE_FILE }} | |
run: | | |
echo "$LICENSE" > $PWD/gurobi.lic | |
echo "grb_license_file=$PWD/gurobi.lic" >> $GITHUB_OUTPUT | |
- name: Set up Python | |
run: uv python install | |
- name: Install the project | |
run: uv sync --extra test | |
- name: run tests | |
run: uv run pytest --color yes -v --cov ilpy --cov-report=xml | |
env: | |
GRB_LICENSE_FILE: ${{ steps.write-license.outputs.grb_license_file }} | |
- name: upload coverage | |
uses: codecov/codecov-action@v5 | |
test-motile: | |
uses: pyapp-kit/workflows/.github/workflows/test-dependents.yml@v2 | |
with: | |
dependency-repo: funkelab/motile | |
dependency-extras: "test" | |
python-version: "3.11" | |
deploy: | |
needs: test | |
if: startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: 👷 Build | |
run: pipx run build | |
- name: 🚢 Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- uses: softprops/action-gh-release@v2 | |
with: | |
generate_release_notes: true | |
files: "./dist/*" |