Skip to content

Update to Volto 18a48 #5275

Update to Volto 18a48

Update to Volto 18a48 #5275

Workflow file for this run

name: CI for Backend and Frontend
on:
workflow_dispatch:
push:
paths:
- "backend/**"
- "frontend/**"
- "frontend-volto/**"
- ".github/workflows/ci.yml"
pull_request:
paths:
- "backend/**"
- "backend-volto/**"
- "frontend/**"
- ".github/workflows/ci.yml"
env:
node-version: 20.x
python: "3.11"
plone: "6.0.13"
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@v4
with:
node-version: ${{ env.node-version }}
- name: Enable corepack
run: corepack enable
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install packages
run: make install
- name: Lint
run: make lint
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@v4
with:
node-version: ${{ env.node-version }}
- name: Enable corepack
run: corepack enable
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install packages
run: make install
- name: Test i18n sync
run: make ci-i18n
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@v4
with:
node-version: ${{ env.node-version }}
- name: Enable corepack
run: corepack enable
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install packages
run: make install
- name: Test
run: make test