Add request-builder fixtures (#40) #32
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: pytest_plone CI | |
| on: | |
| push: | |
| env: | |
| PYTHON_VERSION: "3.12" | |
| PLONE_VERSION: "6.1.4" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| enable-cache: true | |
| - name: Check formatting | |
| if: ${{ success() || failure() }} | |
| id: ruff-format | |
| run: uvx ruff@latest format --diff | |
| - name: Check lint | |
| if: ${{ success() || failure() }} | |
| id: ruff-lint | |
| run: uvx ruff@latest check --diff | |
| - name: Check XML / ZCML | |
| if: ${{ success() || failure() }} | |
| id: zpretty | |
| run: uvx zpretty@latest --check src | |
| - name: Check Package Metadata | |
| if: ${{ success() || failure() }} | |
| id: pyroma | |
| run: uvx pyroma@latest -d . | |
| - name: Check Python Versions | |
| if: ${{ success() || failure() }} | |
| id: py-versions | |
| run: uvx check-python-versions@latest . | |
| - name: Check typing | |
| if: ${{ success() || failure() }} | |
| id: typing | |
| run: | | |
| uvx mypy src | |
| - name: Report | |
| if: ${{ success() || failure() }} | |
| run: | | |
| echo '# Code Analysis' >> $GITHUB_STEP_SUMMARY | |
| echo '| Test | Status |' >> $GITHUB_STEP_SUMMARY | |
| echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Format | ${{ steps.ruff-format.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Lint | ${{ steps.ruff-lint.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY | |
| echo '| XML / ZCML | ${{ steps.zpretty.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Package Metadata | ${{ steps.pyroma.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Python Versions | ${{ steps.py-versions.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Typing | ${{ steps.typing.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| plone-version: ['6.1-latest', '6.0-latest'] | |
| env: | |
| PYTHON_VERSION: ${{ matrix.python-version }} | |
| PLONE_VERSION: ${{ matrix.plone-version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache-suffix: ${{ env.PLONE_VERSION }}-${{ env.PYTHON_VERSION }} | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| pyproject.toml | |
| mx.ini | |
| - name: Install Plone and package | |
| run: make install | |
| - name: Run tests | |
| run: make test | |
| coverage: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - test | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v8.0.0 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache-suffix: ${{ env.PLONE_VERSION }}-${{ env.PYTHON_VERSION }} | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| pyproject.toml | |
| mx.ini | |
| - name: Install Plone and package | |
| run: make install | |
| - name: Run tests | |
| run: make test-coverage | |
| - name: Report Coverage | |
| run: | | |
| echo "# Coverage Report" >> $GITHUB_STEP_SUMMARY | |
| echo "$(uv run coverage report --format markdown)" >> $GITHUB_STEP_SUMMARY | |
| report: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - lint | |
| - test | |
| - coverage | |
| steps: | |
| - name: Report | |
| shell: bash | |
| run: | | |
| echo '# Report' >> $GITHUB_STEP_SUMMARY | |
| echo '| Job | Status |' >> $GITHUB_STEP_SUMMARY | |
| echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Lint | ✅ |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Test | ✅ |' >> $GITHUB_STEP_SUMMARY | |
| echo '| Coverage | ✅ |' >> $GITHUB_STEP_SUMMARY |