Skip to content

merge

merge #82

Workflow file for this run

name: "Main CI"
on:
push:
workflow_dispatch:
jobs:
config:
name: "Config: Compute values used in workflow"
uses: ./.github/workflows/config.yml
lint:
name: "Backend: Lint"
needs:
- config
runs-on: ubuntu-latest
env:
PYTHON_VERSION: ${{ needs.config.outputs.python-version }}
PLONE_VERSION: ${{ needs.config.outputs.plone-version }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup codebase
uses: plone/meta/.github/actions/setup_backend_uv@2.x
with:
python-version: ${{ needs.config.outputs.python-version }}
plone-version: ${{ needs.config.outputs.plone-version }}
- name: Check formatting
id: ruff-format
shell: bash
run: |
uvx ruff@latest format --diff
- name: Check lint
id: ruff-lint
if: ${{ success() || failure() }}
shell: bash
run: |
uvx ruff@latest check --diff
- name: Check XML / ZCML
id: zpretty
if: ${{ success() || failure() }}
shell: bash
run: |
uvx zpretty@latest --check src
- name: Check Python Versions
id: py-versions
if: ${{ success() || failure() }}
shell: bash
run: |
uvx check-python-versions@latest .
- 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 '| Python Versions | ${{ steps.py-versions.conclusion == 'failure' && '❌' || ' ✅' }} |' >> $GITHUB_STEP_SUMMARY
test:
name: "Backend: Test"
needs:
- config
uses: plone/meta/.github/workflows/backend-pytest.yml@2.x
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
plone-version: ['6.2-latest', '6.1-latest', '6.0-latest']
with:
python-version: ${{ matrix.python-version }}
plone-version: ${{ matrix.plone-version }}
coverage:
name: "Backend: Test Coverage"
uses: plone/meta/.github/workflows/backend-pytest-coverage.yml@2.x
needs:
- config
with:
python-version: ${{ needs.config.outputs.python-version }}
plone-version: ${{ needs.config.outputs.plone-version }}
report:
name: "Final report"
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- config
- lint
- test
- coverage
steps:
- name: Report
shell: bash
run: |
echo '# Workflow Report' >> $GITHUB_STEP_SUMMARY
echo '| Job ID | Conclusion |' >> $GITHUB_STEP_SUMMARY
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
echo '| Config | ${{ needs.config.result }} |' >> $GITHUB_STEP_SUMMARY
echo '| Lint | ${{ needs.lint.result }} |' >> $GITHUB_STEP_SUMMARY
echo '| Test | ${{ needs.test.result }} |' >> $GITHUB_STEP_SUMMARY
echo '| Coverage | ${{ needs.coverage.result }} |' >> $GITHUB_STEP_SUMMARY