Skip to content

Commit

Permalink
Cookieplone acceptance tests for seven
Browse files Browse the repository at this point in the history
  • Loading branch information
sneridagh committed Jan 22, 2025
1 parent 9c13693 commit 9e3588c
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,10 @@ jobs:
name: cypress-videos
path: packages/volto/cypress/videos

plone7:
seven:
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
name: Plone 7
name: Seven
timeout-minutes: 45
strategy:
fail-fast: false
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/cookieplone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Cookieplone
on: [push, pull_request]

env:
PYTHON_VERSION: "3.13"

jobs:
seven:
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
name: Seven Cookieplone
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: "${{ env.PYTHON_VERSION }}"
cache: "pip"

- name: Generate Cookieplone-based frontend addon
run: |
pipx install cookieplone
pipx run --no-cache cookieplone --no-input
- name: Set up Node.js environment
uses: ./.github/actions/node_env_setup
with:
node-version: ${{ matrix.node-version }}

- name: Install generated package
working-directory: project-title/frontend
run: |
make install
- name: Cypress acceptance tests
uses: cypress-io/github-action@v6
env:
BABEL_ENV: production
CYPRESS_RETRIES: 2
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install: false
working-directory: packages/seven
browser: chrome
spec: cypress/tests/core/basic/**/*.cy.ts
start: |
make ci-acceptance-backend-start
make project-acceptance-frontend-prod-start
wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:55001/plone http://127.0.0.1:3000'

# Upload Cypress screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: packages/seven/cypress/screenshots
# Upload Cypress videos
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: packages/seven/cypress/videos
2 changes: 1 addition & 1 deletion packages/seven/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ deployment-ci-acceptance-test-run-all: ## With a single command, run the backend

.PHONY: project-acceptance-frontend-prod-start
project-acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode for project tests
(cd ../../my-volto-app && PLONE_API_PATH=http://127.0.0.1:55001/plone yarn build && yarn start:prod)
(cd ../../project-title && pnpm --filter seven build && PLONE_API_PATH=http://127.0.0.1:55001/plone pnpm --filter seven start:prod)

######### Core Sandbox Acceptance tests

Expand Down

0 comments on commit 9e3588c

Please sign in to comment.