Clean up schema and dependencies #989
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: pfb-imaging Workflow | |
on: | |
push: | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version}} | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Upgrade pip and setuptools | |
run: python -m pip install -U pip setuptools | |
# - name: Pin setuptools | |
# run: python -m pip install setuptools==65.5 | |
- name: Install pfb-imaging | |
run: python -m pip install .[testing] | |
- name: Run tests | |
run: py.test -s -vvv tests/ | |
deploy: | |
needs: [test] | |
runs-on: ubuntu-latest | |
# Run on a push to a tag or master | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
steps: | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install latest setuptools, wheel, pip | |
run: python3 -m pip install -U pip setuptools wheel | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Build distributions | |
run: python setup.py sdist bdist_wheel | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TEST_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
continue-on-error: false | |
- name: Publish distribution 📦 to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |