Update CONTRIBUTING.md to use uv for environment management and tes…
#369
Workflow file for this run
This file contains hidden or 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@v6 | |
| - 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 | |
| - python-version: "3.14" | |
| 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@v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| 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: 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@v6 | |
| test-motile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| path: ilpy | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v6 | |
| with: | |
| path: motile | |
| repository: funkelab/motile | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: 3.13 | |
| - name: Install | |
| working-directory: motile | |
| run: | | |
| uv sync --group test | |
| uv pip install ../ilpy | |
| - name: run tests | |
| working-directory: motile | |
| run: uv run --no-sync pytest tests -v --color=yes -W ignore | |
| deploy: | |
| needs: test | |
| if: startsWith(github.ref, 'refs/tags') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: 👷 Build | |
| run: pipx run build | |
| - name: 🚢 Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| - uses: softprops/action-gh-release@v3 | |
| with: | |
| generate_release_notes: true | |
| files: "./dist/*" |