0.9.0-beta #11
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: Python Release | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| test: | |
| name: Test Release | |
| runs-on: self-hosted | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel build | |
| pip install -r requirements.txt | |
| - name: Test with pytest (fast) | |
| run: | | |
| pytest | |
| - name: Test with pytest (slow) | |
| run: | | |
| pytest -m "slow" --cov-fail-under=0 | |
| release-build: | |
| name: Build Release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test | |
| strategy: | |
| fail-fast: true | |
| steps: | |
| - name: Checkout release code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Install most recent build dependencies | |
| run: | | |
| python -m pip install --upgrade pip --upgrade-strategy eager | |
| python -m pip install --upgrade build pipdeptree --upgrade-strategy eager | |
| - name: Output installed packages | |
| run: | | |
| pip freeze --all | |
| - name: Output dependency tree | |
| run: | | |
| pipdeptree | |
| - name: Build release distributions | |
| run: | | |
| python -m build | |
| - name: Upload windows dists | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| pypi-publish: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release-build | |
| environment: | |
| name: pypi | |
| permissions: | |
| id-token: write | |
| strategy: | |
| fail-fast: true | |
| steps: | |
| - name: Retrieve release distributions | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: release-dists | |
| path: dist/ | |
| - name: Publish release distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| print-hash: true |