Migrate to toml package format #18
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
# https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
strategy: | |
# Keep running so we can see if other tests pass | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
os: | |
- ubuntu-24.04 | |
include: | |
- python-version: '3.10' | |
os: macos-latest | |
- python-version: '3.9' | |
os: windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.ref }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install build dependencies | |
run: python -m pip install build flake8 | |
- name: Run flake8 | |
run: flake8 ./omero_user_token | |
- name: Install package | |
run: python -m pip install .[dev] | |
- name: Run tests | |
run: pytest -v | |
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | |
publish-pypi: | |
name: Pypi | |
if: startsWith(github.ref, 'refs/tags') | |
needs: | |
# Only publish if other jobs passed | |
- test | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install build dependencies | |
run: python -m pip install build | |
- name: Build wheel | |
run: python -m build | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |