room for session selector (#143) #287
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: CI/CD | |
on: push | |
jobs: | |
build-wheel: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install --disable-pip-version-check -r requirements.txt | |
- run: pycodestyle tnz/*.py | |
- run: python -m build --wheel --outdir dist/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
- run: mkdocs build | |
test-wheel: | |
needs: build-wheel | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: pip install --disable-pip-version-check pytest -c requirements.txt | |
- uses: actions/download-artifact@v4 | |
- run: pip install $(ls dist/*.whl) | |
- run: zti --version | |
- run: pytest | |
deploy-pypi: | |
if: startsWith(github.ref, 'refs/tags') | |
needs: build-wheel | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-tags: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip install --disable-pip-version-check -r requirements.txt | |
- uses: actions/download-artifact@v4 | |
- run: twine upload --non-interactive -u __token__ dist/* | |
env: | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |