store form data (to be able to test form block) #5213
Workflow file for this run
This file contains 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: CI for Backend and Frontend | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "backend/**" | |
- "frontend/**" | |
- ".github/workflows/ci.yml" | |
pull_request: | |
paths: | |
- "backend/**" | |
- "frontend/**" | |
- ".github/workflows/ci.yml" | |
env: | |
node-version: 20.x | |
python: "3.11" | |
plone: "6.0.10.1" | |
jobs: | |
backend-black: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'backend' | |
check: 'black' | |
backend-flake8: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'backend' | |
check: 'flake8' | |
backend-isort: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'backend' | |
check: 'isort' | |
backend-zpretty: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'backend' | |
check: 'zpretty' | |
backend-tests: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./backend | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Plone ${{ env.plone }} with Python ${{ env.python }} | |
uses: plone/[email protected] | |
with: | |
python-version: ${{ env.python }} | |
plone-version: ${{ env.plone }} | |
- name: Install package | |
run: | | |
pip install mxdev | |
mxdev -c mx.ini | |
pip install -r requirements-mxdev.txt | |
- name: Run tests | |
run: | | |
PYTHONWARNINGS=ignore zope-testrunner --auto-color --auto-progress --test-path src/plone_6_demo_site/src/ | |
classic-black: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'classic' | |
check: 'black' | |
classic-flake8: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'classic' | |
check: 'flake8' | |
classic-isort: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'classic' | |
check: 'isort' | |
classic-zpretty: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run check | |
uses: plone/code-analysis-action@v2 | |
with: | |
base_dir: 'classic' | |
check: 'zpretty' | |
frontend-eslint: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: 'yarn' | |
cache-dependency-path: 'frontend/yarn.lock' | |
- name: Install packages | |
run: make install | |
- name: Lint | |
run: yarn run lint | |
frontend-prettier: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Run Prettier | |
run: npx [email protected] --single-quote --check 'src/**/*.{js,jsx,ts,tsx,css,scss}' --config=package.json | |
frontend-i18n: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
name: i18n sync | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: frontend | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: 'yarn' | |
cache-dependency-path: 'frontend/yarn.lock' | |
- name: Install packages | |
run: make install | |
- name: Test i18n sync | |
run: make i18n-ci | |
frontend-tests: | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- name: Checkout codebase | |
uses: actions/checkout@v4 | |
- name: Use Node.js ${{ env.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: 'yarn' | |
cache-dependency-path: 'frontend/yarn.lock' | |
- name: Install packages | |
run: make install | |
- name: Test | |
run: make test | |