Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

# EditorConfig Configurtaion file, for more details see:
# https://EditorConfig.org
# EditorConfig is a convention description, that could be interpreted
# by multiple editors to enforce common coding conventions for specific
# file types

# top-most EditorConfig file:
# Will ignore other EditorConfig files in Home directory or upper tree level.
root = true


[*] # For All Files
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Set default charset
charset = utf-8
# Indent style default
indent_style = space

[*.{py,cfg,ini}]
# 4 space indentation
indent_size = 4

[*.{html,dtml,pt,zpt,xml,zcml,js,json,ts,less,scss,css,sass,yml,yaml}]
# 2 space indentation
indent_size = 2

[{Makefile,.gitmodules}]
# Tab indentation (no size specified, but view as 4 spaces)
indent_style = tab
indent_size = unset
tab_width = unset
4 changes: 4 additions & 0 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
env:
NODE_VERSION: 24

defaults:
run:
working-directory: ./frontend

jobs:

acceptance:
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Backend CI

on:
workflow_call:
inputs:
base-tag:
required: true
type: string
image-name-prefix:
required: true
type: string
image-name-suffix:
required: true
type: string
python-version:
required: true
type: string
plone-version:
required: true
type: string
working-directory:
required: false
type: string
default: backend

jobs:

lint:
name: "Backend: Lint"
uses: plone/meta/.github/workflows/backend-lint.yml@2.x
with:
python-version: ${{ inputs.python-version }}
plone-version: ${{ inputs.plone-version }}
working-directory: ${{ inputs.working-directory }}

test:
name: "Backend: Test"
uses: plone/meta/.github/workflows/backend-pytest.yml@2.x
strategy:
fail-fast: false
matrix:
python-version: ['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 }}
working-directory: ${{ inputs.working-directory }}

coverage:
name: "Backend: Coverage"
uses: plone/meta/.github/workflows/backend-pytest-coverage.yml@2.x
with:
python-version: ${{ inputs.python-version }}
plone-version: ${{ inputs.plone-version }}
working-directory: ${{ inputs.working-directory }}

release:
name: "Backend: Build and publish Container Image"
uses: plone/meta/.github/workflows/container-image-build-push.yml@2.x
needs:
- lint
- test
- coverage
permissions:
contents: read
packages: write
with:
base-tag: ${{ inputs.base-tag }}
image-name-prefix: ${{ inputs.image-name-prefix }}
image-name-suffix: ${{ inputs.image-name-suffix }}
working-directory: ${{ inputs.working-directory }}
build-args: |
PLONE_VERSION=${{ inputs.plone-version }}
push: ${{ github.event_name != 'pull_request' }}
secrets:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

report:
name: "Final report"
if: ${{ always() }}
runs-on: ubuntu-latest
needs:
- lint
- test
- coverage
- release
steps:
- name: Write report
run: |
echo '# Workflow Report' >> $GITHUB_STEP_SUMMARY
echo '| Job ID | Conclusion |' >> $GITHUB_STEP_SUMMARY
echo '| --- | --- |' >> $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
echo '| release | ${{ needs.release.result }} |' >> $GITHUB_STEP_SUMMARY
95 changes: 86 additions & 9 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Changelog check
name: "Changelog"
on:
pull_request:
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
Expand All @@ -8,20 +8,76 @@ on:
env:
NODE_VERSION: 24
ADDON_NAME: volto-plate
BASE_BRANCH: main

jobs:
build:
config:
runs-on: ubuntu-latest
outputs:
backend: ${{ steps.filter.outputs.backend }}
frontend: ${{ steps.filter.outputs.frontend }}
repository: ${{ steps.filter.outputs.repository }}
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v5

- uses: dorny/paths-filter@v3.0.2
id: filter
with:
filters: |
backend:
- 'backend/**'
repository:
- '.github/**'
- '.vscode/**'
- 'devops/**'
- 'docs/**'
- 'docker-compose.yml'
- 'README.md'
frontend:
- 'frontend/**'

backend:
if: ${{ needs.config.outputs.backend == 'true' }}
runs-on: ubuntu-latest
needs:
- config
steps:
- uses: actions/checkout@v5
with:
# Fetch all history
fetch-depth: '0'

- name: Install pipx
run: pip install towncrier

- name: Check for presence of a Change Log fragment (only pull requests)
if: github.event_name == 'pull_request'
run: |
# Fetch the pull request' base branch so towncrier will be able to
# compare the current branch with the base branch.
# Source: https://github.com/actions/checkout/#fetch-all-branches.
git fetch --no-tags origin ${BASE_BRANCH}
towncrier check --compare-with origin/${{ env.BASE_BRANCH }} --config backend/pyproject.toml --dir backend/

frontend:
if: ${{ needs.config.outputs.frontend == 'true' }}
runs-on: ubuntu-latest
needs:
- config
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v5
with:
# Fetch all history
fetch-depth: '0'

- name: Install pipx
run: pip install towncrier

- name: Use Node.js
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
Expand All @@ -43,16 +99,37 @@ jobs:
${{ runner.os }}-pnpm-store-

- name: Install dependencies
run: |
make install
run: make install

- name: Check for presence of a Change Log fragment (only pull requests)
if: github.event_name == 'pull_request'
run: |
# Fetch the pull request' base branch so towncrier will be able to
# compare the current branch with the base branch.
# Source: https://github.com/actions/checkout/#fetch-all-branches.
git fetch --no-tags origin ${BASE_BRANCH}
towncrier check --dir packages/${ADDON_NAME}
env:
BASE_BRANCH: ${{ github.base_ref }}
cd ..
towncrier check --compare-with origin/${{ env.BASE_BRANCH }} --config frontend/packages/${{ env.ADDON_NAME }}/towncrier.toml --dir frontend/packages/${{ env.ADDON_NAME }}

repository:
if: ${{ needs.config.outputs.repository == 'true' }}
runs-on: ubuntu-latest
needs:
- config
steps:
- uses: actions/checkout@v5
with:
# Fetch all history
fetch-depth: '0'

- name: Install pipx
run: pip install towncrier

- name: Check for presence of a Change Log fragment (only pull requests)
if: github.event_name == 'pull_request'
run: |
# Fetch the pull request' base branch so towncrier will be able to
# compare the current branch with the base branch.
# Source: https://github.com/actions/checkout/#fetch-all-branches.
git fetch --no-tags origin ${BASE_BRANCH}
towncrier check --compare-with origin/${{ env.BASE_BRANCH }} --config towncrier.toml --dir .
47 changes: 0 additions & 47 deletions .github/workflows/code.yml

This file was deleted.

Loading
Loading