General Update and linting/typing/formatting #14
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@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 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up Python | |
| run: uv python install | |
| - name: run tests | |
| run: uv run --extra test pytest --color yes -v --cov structsvm --cov-report=xml | |
| - name: upload coverage | |
| uses: codecov/codecov-action@v5 | |
| test-motile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: structsvm | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: motile | |
| repository: funkelab/motile | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Install | |
| run: | | |
| python -m pip install -U pip | |
| python -m pip install ./structsvm | |
| python -m pip install ./motile[test] | |
| - name: run tests | |
| run: pytest --color=yes -W default | |
| working-directory: motile | |
| 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 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| files: "./dist/*" |