Skip to content

Commit 971c89e

Browse files
committed
Try new scaffold
1 parent 69a4097 commit 971c89e

File tree

177 files changed

+4661
-389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+4661
-389
lines changed

.editorconfig

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
# EditorConfig Configurtaion file, for more details see:
3+
# https://EditorConfig.org
4+
# EditorConfig is a convention description, that could be interpreted
5+
# by multiple editors to enforce common coding conventions for specific
6+
# file types
7+
8+
# top-most EditorConfig file:
9+
# Will ignore other EditorConfig files in Home directory or upper tree level.
10+
root = true
11+
12+
13+
[*] # For All Files
14+
# Unix-style newlines with a newline ending every file
15+
end_of_line = lf
16+
insert_final_newline = true
17+
trim_trailing_whitespace = true
18+
# Set default charset
19+
charset = utf-8
20+
# Indent style default
21+
indent_style = space
22+
23+
[*.{py,cfg,ini}]
24+
# 4 space indentation
25+
indent_size = 4
26+
27+
[*.{html,dtml,pt,zpt,xml,zcml,js,json,ts,less,scss,css,sass,yml,yaml}]
28+
# 2 space indentation
29+
indent_size = 2
30+
31+
[{Makefile,.gitmodules}]
32+
# Tab indentation (no size specified, but view as 4 spaces)
33+
indent_style = tab
34+
indent_size = unset
35+
tab_width = unset

.github/workflows/acceptance.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
env:
1313
NODE_VERSION: 24
1414

15+
defaults:
16+
run:
17+
working-directory: ./frontend
18+
1519
jobs:
1620

1721
acceptance:

.github/workflows/backend.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Backend CI
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
base-tag:
7+
required: true
8+
type: string
9+
image-name-prefix:
10+
required: true
11+
type: string
12+
image-name-suffix:
13+
required: true
14+
type: string
15+
python-version:
16+
required: true
17+
type: string
18+
plone-version:
19+
required: true
20+
type: string
21+
working-directory:
22+
required: false
23+
type: string
24+
default: backend
25+
26+
jobs:
27+
28+
lint:
29+
name: "Backend: Lint"
30+
uses: plone/meta/.github/workflows/backend-lint.yml@2.x
31+
with:
32+
python-version: ${{ inputs.python-version }}
33+
plone-version: ${{ inputs.plone-version }}
34+
working-directory: ${{ inputs.working-directory }}
35+
36+
test:
37+
name: "Backend: Test"
38+
uses: plone/meta/.github/workflows/backend-pytest.yml@2.x
39+
strategy:
40+
fail-fast: false
41+
matrix:
42+
python-version: ['3.11', '3.12', '3.13']
43+
plone-version: ['6.2-latest', '6.1-latest', '6.0-latest']
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
plone-version: ${{ matrix.plone-version }}
47+
working-directory: ${{ inputs.working-directory }}
48+
49+
coverage:
50+
name: "Backend: Coverage"
51+
uses: plone/meta/.github/workflows/backend-pytest-coverage.yml@2.x
52+
with:
53+
python-version: ${{ inputs.python-version }}
54+
plone-version: ${{ inputs.plone-version }}
55+
working-directory: ${{ inputs.working-directory }}
56+
57+
release:
58+
name: "Backend: Build and publish Container Image"
59+
uses: plone/meta/.github/workflows/container-image-build-push.yml@2.x
60+
needs:
61+
- lint
62+
- test
63+
- coverage
64+
permissions:
65+
contents: read
66+
packages: write
67+
with:
68+
base-tag: ${{ inputs.base-tag }}
69+
image-name-prefix: ${{ inputs.image-name-prefix }}
70+
image-name-suffix: ${{ inputs.image-name-suffix }}
71+
working-directory: ${{ inputs.working-directory }}
72+
build-args: |
73+
PLONE_VERSION=${{ inputs.plone-version }}
74+
push: ${{ github.event_name != 'pull_request' }}
75+
secrets:
76+
username: ${{ github.actor }}
77+
password: ${{ secrets.GITHUB_TOKEN }}
78+
79+
report:
80+
name: "Final report"
81+
if: ${{ always() }}
82+
runs-on: ubuntu-latest
83+
needs:
84+
- lint
85+
- test
86+
- coverage
87+
- release
88+
steps:
89+
- name: Write report
90+
run: |
91+
echo '# Workflow Report' >> $GITHUB_STEP_SUMMARY
92+
echo '| Job ID | Conclusion |' >> $GITHUB_STEP_SUMMARY
93+
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
94+
echo '| lint | ${{ needs.lint.result }} |' >> $GITHUB_STEP_SUMMARY
95+
echo '| test | ${{ needs.test.result }} |' >> $GITHUB_STEP_SUMMARY
96+
echo '| coverage | ${{ needs.coverage.result }} |' >> $GITHUB_STEP_SUMMARY
97+
echo '| release | ${{ needs.release.result }} |' >> $GITHUB_STEP_SUMMARY

.github/workflows/changelog.yml

Lines changed: 86 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Changelog check
1+
name: "Changelog"
22
on:
33
pull_request:
44
types: [assigned, opened, synchronize, reopened, labeled, unlabeled]
@@ -8,20 +8,76 @@ on:
88
env:
99
NODE_VERSION: 24
1010
ADDON_NAME: volto-plate
11+
BASE_BRANCH: main
1112

1213
jobs:
13-
build:
14+
config:
1415
runs-on: ubuntu-latest
16+
outputs:
17+
backend: ${{ steps.filter.outputs.backend }}
18+
frontend: ${{ steps.filter.outputs.frontend }}
19+
repository: ${{ steps.filter.outputs.repository }}
1520
steps:
16-
- uses: actions/checkout@v4
21+
- name: Checkout
22+
uses: actions/checkout@v5
23+
24+
- uses: dorny/paths-filter@v3.0.2
25+
id: filter
26+
with:
27+
filters: |
28+
backend:
29+
- 'backend/**'
30+
repository:
31+
- '.github/**'
32+
- '.vscode/**'
33+
- 'devops/**'
34+
- 'docs/**'
35+
- 'docker-compose.yml'
36+
- 'README.md'
37+
frontend:
38+
- 'frontend/**'
39+
40+
backend:
41+
if: ${{ needs.config.outputs.backend == 'true' }}
42+
runs-on: ubuntu-latest
43+
needs:
44+
- config
45+
steps:
46+
- uses: actions/checkout@v5
47+
with:
48+
# Fetch all history
49+
fetch-depth: '0'
50+
51+
- name: Install pipx
52+
run: pip install towncrier
53+
54+
- name: Check for presence of a Change Log fragment (only pull requests)
55+
if: github.event_name == 'pull_request'
56+
run: |
57+
# Fetch the pull request' base branch so towncrier will be able to
58+
# compare the current branch with the base branch.
59+
# Source: https://github.com/actions/checkout/#fetch-all-branches.
60+
git fetch --no-tags origin ${BASE_BRANCH}
61+
towncrier check --compare-with origin/${{ env.BASE_BRANCH }} --config backend/pyproject.toml --dir backend/
62+
63+
frontend:
64+
if: ${{ needs.config.outputs.frontend == 'true' }}
65+
runs-on: ubuntu-latest
66+
needs:
67+
- config
68+
defaults:
69+
run:
70+
working-directory: ./frontend
71+
steps:
72+
- uses: actions/checkout@v5
1773
with:
1874
# Fetch all history
1975
fetch-depth: '0'
2076

2177
- name: Install pipx
2278
run: pip install towncrier
2379

24-
- name: Use Node.js
80+
- name: Use Node.js ${{ env.NODE_VERSION }}
2581
uses: actions/setup-node@v4
2682
with:
2783
node-version: ${{ env.NODE_VERSION }}
@@ -43,16 +99,37 @@ jobs:
4399
${{ runner.os }}-pnpm-store-
44100
45101
- name: Install dependencies
46-
run: |
47-
make install
102+
run: make install
48103

49104
- name: Check for presence of a Change Log fragment (only pull requests)
105+
if: github.event_name == 'pull_request'
50106
run: |
51107
# Fetch the pull request' base branch so towncrier will be able to
52108
# compare the current branch with the base branch.
53109
# Source: https://github.com/actions/checkout/#fetch-all-branches.
54110
git fetch --no-tags origin ${BASE_BRANCH}
55-
towncrier check --dir packages/${ADDON_NAME}
56-
env:
57-
BASE_BRANCH: ${{ github.base_ref }}
111+
cd ..
112+
towncrier check --compare-with origin/${{ env.BASE_BRANCH }} --config frontend/packages/${{ env.ADDON_NAME }}/towncrier.toml --dir frontend/packages/${{ env.ADDON_NAME }}
113+
114+
repository:
115+
if: ${{ needs.config.outputs.repository == 'true' }}
116+
runs-on: ubuntu-latest
117+
needs:
118+
- config
119+
steps:
120+
- uses: actions/checkout@v5
121+
with:
122+
# Fetch all history
123+
fetch-depth: '0'
124+
125+
- name: Install pipx
126+
run: pip install towncrier
127+
128+
- name: Check for presence of a Change Log fragment (only pull requests)
58129
if: github.event_name == 'pull_request'
130+
run: |
131+
# Fetch the pull request' base branch so towncrier will be able to
132+
# compare the current branch with the base branch.
133+
# Source: https://github.com/actions/checkout/#fetch-all-branches.
134+
git fetch --no-tags origin ${BASE_BRANCH}
135+
towncrier check --compare-with origin/${{ env.BASE_BRANCH }} --config towncrier.toml --dir .

.github/workflows/code.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)