correct diagram #6
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: continuous-integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| jobs: | |
| linux: | |
| name: Build and test on Linux | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheel | |
| pip install --upgrade-strategy eager -e .[dev] | |
| - name: Run pre-commit hooks | |
| run: | | |
| pre-commit run --all-files | |
| - name: Build | |
| run: | | |
| pip install build | |
| python -m build | |
| windows: | |
| name: Build and test on Windows | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~\AppData\Local\pip\Cache | |
| key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheel | |
| pip install --upgrade-strategy eager -e .[dev] | |
| - name: Run pre-commit hooks | |
| run: | | |
| pre-commit run --all-files | |
| - name: Build | |
| run: | | |
| pip install build | |
| python -m build | |
| publish: | |
| name: Publish to PyPi | |
| needs: [linux, windows] | |
| if: startsWith(github.event.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: release | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install build dependencies | |
| run: | | |
| pip install build | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Publish | |
| uses: pypa/gh-action-pypi-publish@v1.12.3 |