Update link to paper #77
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 | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: '3.10' | |
- name: Run pre-commit linting | |
run: pipx run pre-commit run --all-files | |
test: | |
name: ${{ matrix.platform }} py${{ matrix.python-version }} ilp=${{ matrix.ilp }} | |
runs-on: ${{ matrix.platform }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
platform: [ubuntu-latest] | |
ilp: ["false"] | |
include: | |
- platform: windows-latest | |
python-version: "3.10" | |
ilp: "false" | |
- platform: macos-latest | |
python-version: "3.10" | |
ilp: "false" | |
- platform: ubuntu-latest | |
python-version: "3.10" | |
ilp: "true" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
miniforge-version: latest | |
use-mamba: true | |
channels: conda-forge | |
channel-priority: true | |
- name: Install ilp dependencies | |
if: matrix.ilp == 'true' | |
run: mamba install -c gurobi -c funkelab ilpy | |
- name: Install package and dependencies | |
run: python -m pip install -e .[test] | |
- name: Test | |
run: pytest tests -v -s --color=yes | |
upload_pypi: | |
name: Upload package to PyPi | |
needs: [lint, test] | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' # upload to pypi only on release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- run: python3 -m pip install --upgrade build && python3 -m build | |
- name: Publish package to PyPi | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
verbose: true |