Update test workflow #28
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: Release | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
test-run: | |
name: Test Run | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11" ] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Panther | |
run: python -m pip install . | |
- name: Run Tests | |
run: | | |
cd tests/run | |
python -m unittest test_*.py | |
test-functional: | |
name: Test Functional | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11" ] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Panther | |
run: python -m pip install . | |
- name: Run Tests | |
run: python -m unittest tests/test_*.py | |
build-n-publish: | |
name: Build and publish to PyPI | |
runs-on: ubuntu-latest | |
needs: [test-run, test-functional] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Build source and wheel distributions | |
run: | | |
python -m pip install --upgrade build twine | |
python -m build | |
twine check --strict dist/* | |
- name: Publish distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |