From 14c1ddb186902c3e560fae7d047b2dd2d7ee2807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Wed, 26 Jun 2024 08:37:43 +0200 Subject: [PATCH] Rename Makefile targets (#6104) Co-authored-by: Steve Piercy --- .github/workflows/acceptance.yml | 156 ++----- .github/workflows/deployment_tests.yml | 12 +- ...pr-preview.yml => docs-rtd-pr-preview.yml} | 2 +- .github/workflows/unit.yml | 5 +- .gitignore | 16 - .readthedocs.yaml | 2 +- Makefile | 384 ++++++++---------- apps/nextjs/README.md | 2 +- apps/plone/.gitignore | 16 +- apps/remix/README.md | 3 +- docs/source/contributing/acceptance-tests.md | 8 +- docs/source/contributing/developing-core.md | 2 +- docs/source/upgrade-guide/index.md | 99 +++++ g-api/README.md | 6 - package.json | 1 - packages/volto/.gitignore | 26 -- packages/volto/Makefile | 270 ++++++------ packages/volto/news/6104.internal | 1 + 18 files changed, 473 insertions(+), 538 deletions(-) rename .github/workflows/{rtd-pr-preview.yml => docs-rtd-pr-preview.yml} (90%) create mode 100644 packages/volto/news/6104.internal diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index aaba6f2349..62a71b8242 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -63,8 +63,8 @@ jobs: browser: chrome spec: cypress/tests/core/basic/**/*.js start: | - make start-test-acceptance-server - make start-test-acceptance-frontend + make ci-acceptance-backend-start + make 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 @@ -142,8 +142,8 @@ jobs: browser: chrome spec: cypress/tests/core/content/**/*.js start: | - make start-test-acceptance-server - make start-test-acceptance-frontend + make ci-acceptance-backend-start + make 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 @@ -221,8 +221,8 @@ jobs: browser: chrome spec: cypress/tests/core/controlpanels/**/*.js start: | - make start-test-acceptance-server - make start-test-acceptance-frontend + make ci-acceptance-backend-start + make 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 @@ -300,8 +300,8 @@ jobs: browser: chrome spec: cypress/tests/core/blocks/*.js start: | - make start-test-acceptance-server - make start-test-acceptance-frontend + make ci-acceptance-backend-start + make 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 @@ -379,8 +379,8 @@ jobs: browser: chrome spec: cypress/tests/core/blocks/listing/*.js start: | - make start-test-acceptance-server - make start-test-acceptance-frontend + make ci-acceptance-backend-start + make 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 @@ -458,8 +458,8 @@ jobs: browser: chrome spec: cypress/tests/core/volto-slate/**/*.js start: | - make start-test-acceptance-server - make start-test-acceptance-frontend + make ci-acceptance-backend-start + make 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 @@ -536,8 +536,8 @@ jobs: browser: chrome spec: cypress/tests/core/basic/**/*.js start: | - make start-test-acceptance-server-5 - make start-test-acceptance-frontend + make plone5-acceptance-backend-start + make 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 @@ -615,8 +615,8 @@ jobs: browser: chrome spec: cypress/tests/coresandbox/**/*.js start: | - make start-test-acceptance-server-coresandbox - make start-test-acceptance-frontend-coresandbox + make coresandbox-acceptance-backend-start + make coresandbox-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 @@ -632,74 +632,6 @@ jobs: name: cypress-videos path: packages/volto/cypress/videos - # guillotina: - # if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - # name: Guillotina - # runs-on: ubuntu-latest - # timeout-minutes: 35 - # strategy: - # fail-fast: false - # matrix: - # node-version: [18.x] - # steps: - # - uses: actions/checkout@v4 - - # # node setup - # - name: Use Node.js ${{ matrix.node-version }} - # uses: actions/setup-node@v4 - # with: - # node-version: ${{ matrix.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- - - # - run: pnpm i - - # - name: Cypress acceptance tests - # uses: cypress-io/github-action@v6 - # env: - # BABEL_ENV: production - # CYPRESS_API: guillotina - # 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/volto - # browser: chrome - # spec: cypress/tests/guillotina/**/*.js - # start: | - # make start-test-acceptance-server-guillotina - # make start-test-acceptance-frontend-guillotina - # wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:8081 http://127.0.0.1:3000' - - # # Upload Cypress screenshots - # - uses: actions/upload-artifact@v1 - # if: failure() - # with: - # name: cypress-screenshots - # path: packages/volto/cypress/screenshots - # # Upload Cypress videos - # - uses: actions/upload-artifact@v1 - # if: failure() - # with: - # name: cypress-videos - # path: packages/volto/cypress/videos - multilingual: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Multilingual @@ -762,8 +694,8 @@ jobs: browser: chrome spec: cypress/tests/multilingual/**/*.js start: | - make start-test-acceptance-server-multilingual - make start-test-acceptance-frontend-multilingual + make multilingual-acceptance-backend-start + make multilingual-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 @@ -828,30 +760,6 @@ jobs: working-directory: packages/volto run: make cypress-install - # # python setup (temporary, while p.a.iterate changes are in a PR) - # - name: Set up Python ${{ matrix.python-version }} - # uses: actions/setup-python@v1 - # with: - # python-version: ${{ matrix.python-version }} - - # # python cache - # - uses: actions/cache@v1 - # with: - # path: ~/.cache/pip - # key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} - # restore-keys: | - # ${{ runner.os }}-pip- - # # python install - # - run: pip install virtualenv - # - name: pip install - # working-directory: api - # run: pip install -r requirements.txt - # - name: buildout - # working-directory: api - # run: buildout - # env: - # CI: true - - name: Cypress acceptance tests uses: cypress-io/github-action@v6 env: @@ -866,8 +774,8 @@ jobs: browser: chrome spec: cypress/tests/workingCopy/**/*.js start: | - make start-test-acceptance-server-workingcopy - make start-test-acceptance-frontend-workingcopy + make working-copy-acceptance-backend-start + make working-copy-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 @@ -1002,8 +910,8 @@ jobs: browser: chrome spec: cypress/tests/minimal/**/*.js start: | - make start-test-acceptance-server - make start-test-acceptance-frontend-project + 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 @@ -1025,9 +933,9 @@ jobs: if: success() working-directory: ${{env.generator-directory}} - seamless: + deployment: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - name: Seamless Mode + name: Deployment Mode runs-on: ubuntu-latest timeout-minutes: 35 strategy: @@ -1088,9 +996,9 @@ jobs: spec: cypress/tests/core/basic/**/*.js config: baseUrl=http://localhost start: | - make start-test-acceptance-server - make start-test-acceptance-frontend-seamless - make start-test-acceptance-webserver-seamless + make ci-acceptance-backend-start + make deployment-acceptance-frontend-prod-start + make deployment-acceptance-web-server-start wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:55001/plone http://127.0.0.1:3000 http://localhost' # Upload Cypress screenshots @@ -1106,9 +1014,9 @@ jobs: name: cypress-videos-seamless path: packages/volto/cypress/videos - multilingualseamless: + multilingual-deployment: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name - name: Multilingual in Seamless Mode + name: Multilingual in Deployment Mode runs-on: ubuntu-latest timeout-minutes: 25 strategy: @@ -1169,9 +1077,9 @@ jobs: spec: cypress/tests/multilingual/**/*.js config: baseUrl=http://localhost start: | - make start-test-acceptance-server-seamless-multilingual - make start-test-acceptance-frontend-seamless-multilingual - make start-test-acceptance-webserver-seamless + make deployment-multilingual-acceptance-backend-start + make deployment-multilingual-acceptance-frontend-prod-start + make deployment-acceptance-web-server-start wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:55001/plone http://127.0.0.1:3000 http://localhost' # Upload Cypress screenshots diff --git a/.github/workflows/deployment_tests.yml b/.github/workflows/deployment_tests.yml index a9a11ee92d..5f22b40b67 100644 --- a/.github/workflows/deployment_tests.yml +++ b/.github/workflows/deployment_tests.yml @@ -44,7 +44,7 @@ jobs: run: pnpm build:all - name: Start backend - run: make start-backend-docker-detached + run: make backend-docker-detached-start - name: Build run: pnpm --filter plone-vite-ssr build @@ -65,7 +65,7 @@ jobs: run: node packages/scripts/check_deployment.js - name: Stop backend - run: make stop-backend-docker-detached + run: make backend-docker-detached-stop nextjs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name @@ -106,7 +106,7 @@ jobs: run: pnpm build:all - name: Start backend - run: make start-backend-docker-detached + run: make backend-docker-detached-start - name: Build run: pnpm --filter plone-nextjs build @@ -127,7 +127,7 @@ jobs: run: node packages/scripts/check_deployment.js - name: Stop backend - run: make stop-backend-docker-detached + run: make backend-docker-detached-stop remix: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name @@ -168,7 +168,7 @@ jobs: run: pnpm build:all - name: Start backend - run: make start-backend-docker-detached + run: make backend-docker-detached-start - name: Build run: pnpm --filter plone-remix build @@ -183,4 +183,4 @@ jobs: run: node packages/scripts/check_deployment.js - name: Stop backend - run: make stop-backend-docker-detached + run: make backend-docker-detached-stop diff --git a/.github/workflows/rtd-pr-preview.yml b/.github/workflows/docs-rtd-pr-preview.yml similarity index 90% rename from .github/workflows/rtd-pr-preview.yml rename to .github/workflows/docs-rtd-pr-preview.yml index 465d6a14ec..30e8fd732f 100644 --- a/.github/workflows/rtd-pr-preview.yml +++ b/.github/workflows/docs-rtd-pr-preview.yml @@ -1,4 +1,4 @@ -# .github/workflows/rtd-pr-preview.yml +# .github/workflows/docs-rtd-pr-preview.yml name: readthedocs/actions on: pull_request_target: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index b9cc94cd42..cfccae4362 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -157,11 +157,14 @@ jobs: - run: pnpm i - - run: make start-test-acceptance-server-detached + - run: make acceptance-server-detached-start - run: npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone && pnpm --filter @plone/client test working-directory: packages/client + - run: make acceptance-server-detached-stop + + helpers: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: '@plone/helpers' diff --git a/.gitignore b/.gitignore index 5d92feff8c..28d280fb5a 100644 --- a/.gitignore +++ b/.gitignore @@ -33,21 +33,6 @@ lighthouse-report.html .*project # Python -/api/.installed.cfg -/api/.mr.developer.cfg -/api/bin/ -/api/develop-eggs/ -/api/eggs/ -/api/include/ -/api/lib/ -/api/lib64/ -/api/notebook/env/ -/api/parts/ -/api/share/python-wheels/ -/api/src/ -/api/test/ -/api/var/ -/api/venv/ /bin/ /lib/ .Python @@ -55,7 +40,6 @@ include pip-selfcheck.json pyvenv.cfg share -/api/lib64 lib64 # locales diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8085e2a6c7..e2295290f3 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -34,4 +34,4 @@ build: - pnpm install - pnpm build:registry - (cd packages/volto && pnpm build-storybook -o ${READTHEDOCS_OUTPUT}/html/storybook) - - make rtd-pr-preview + - make docs-rtd-pr-preview diff --git a/Makefile b/Makefile index df51d229ec..1164cab39c 100644 --- a/Makefile +++ b/Makefile @@ -42,67 +42,47 @@ YELLOW=`tput setaf 3` # Top-level targets .PHONY: all -all: build +all: help # Add the following 'help' target to your Makefile -# And add help text after each target name starting with '\#\#' +# and add help text after each target name starting with ' ##' +# to return a pretty list of targets and their descriptions. .PHONY: help -help: .SHELLFLAGS:=-eu -o pipefail -O inherit_errexit -c help: ## This help message - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)" .PHONY: start -# Run both the back-end and the front end -start: - $(MAKE) -j 2 start-backend start-frontend - -.PHONY: start-frontend -start-frontend: +start: ## Starts Volto, allowing reloading of the add-on during development pnpm start -.PHONY: start-backend -start-backend: ## Start Plone Backend - $(MAKE) -C "./api/" start - -# TODO: Review release commands for all packages -# Use TurboRepo - .PHONY: build -build: - make build-backend - make build-frontend - -.PHONY: build-frontend -build-frontend: - $(MAKE) -C "./packages/volto/" build-frontend - -.PHONY: build-backend -build-backend: ## Build Plone 5.2 - $(MAKE) -C "./api/" build +build: ## Build a production bundle for distribution + $(MAKE) -C "./packages/volto/" build .PHONY: test -test: - $(MAKE) -C "./api/" test - -bin/python: - python3 -m venv . || virtualenv --clear --python=python3 . - bin/python -m pip install --upgrade pip - @echo "Python environment created." - bin/pip install -r requirements-docs.txt - @echo "Requirements installed." +test: ## Run unit tests + $(MAKE) -C "./packages/volto/" test .PHONY: clean -clean: - $(MAKE) -C "./api/" clean +clean: ## Clean development environment + rm -rf node_modules find ./packages -name node_modules -exec rm -rf {} \; -.PHONY: setup -setup: +.PHONY: install +install: build-deps ## Set up development environment # Setup ESlint for VSCode node packages/scripts/vscodesettings.js + pnpm i ##### Documentation +bin/python: ## Create a Python virtual environment with the latest pip, and install documentation requirements + python3 -m venv . || virtualenv --clear --python=python3 . + bin/python -m pip install --upgrade pip + @echo "Python environment created." + bin/pip install -r requirements-docs.txt + @echo "Requirements installed." + .PHONY: docs-clean docs-clean: ## Clean current and legacy docs build directories, and Python virtual environment rm -rf bin include lib @@ -143,8 +123,8 @@ docs-vale: bin/python docs-news ## Install (once) and run Vale style, grammar, @echo @echo "Vale is finished; look for any errors in the above output." -.PHONY: rtd-pr-preview -rtd-pr-preview: +.PHONY: docs-rtd-pr-preview +docs-rtd-pr-preview: ## Build previews of pull requests that have documentation changes on Read the Docs via CI pip install -r requirements-docs.txt cd $(DOCS_DIR) && sphinx-build -b html $(ALLSPHINXOPTS) ${READTHEDOCS_OUTPUT}/html/ @@ -153,247 +133,243 @@ docs-test: docs-clean docs-linkcheckbroken docs-vale ## Clean docs build, then ##### Build -.PHONY: storybook-build -storybook-build: - pnpm build:registry - (cd packages/volto && pnpm build-storybook -o ../../docs/_build/html/storybook) - -.PHONY: patches -patches: - (cd packages/volto && /bin/bash patches/patchit.sh > /dev/null 2>&1 ||true) - .PHONY: cypress-install -cypress-install: +cypress-install: ## Install Cypress for acceptance tests $(NODEBIN)/cypress install +packages/registry/dist: packages/registry/src + pnpm build:registry + +packages/components/dist: packages/components/src + pnpm build:components + .PHONY: build-deps -build-deps: - if [ ! -d $$(pwd)/packages/registry/dist ]; then (pnpm build:deps); fi +build-deps: packages/registry/dist ## Build dependencies -##### Release +## Storybook + +.PHONY: storybook-start +storybook-start: ## Start Storybook server on port 6006 + $(MAKE) -C "./packages/volto/" storybook-start + +.PHONY: storybook-build +storybook-build: ## Build Storybook + $(MAKE) -C "./packages/volto/" storybook-build -.PHONY: corepackagebump -corepackagebump: - node $(SCRIPTSPACKAGE)/corepackagebump.js packages/volto-slate $(VERSION) +##### Release -.PHONY: copyreleasenotestodocs -copyreleasenotestodocs: +.PHONY: release-notes-copy-to-docs +release-notes-copy-to-docs: ## Copy release notes into documentation cp CHANGELOG.md docs/source/release-notes/index.md git add docs/source/release-notes/index.md ##### Docker containers -.PHONY: start-backend-docker -start-backend-docker: - docker run -it --rm --name=backend -p 8080:8080 -e SITE=Plone -e ADDONS='$(KGS)' $(DOCKER_IMAGE) +.PHONY: backend-docker-start +backend-docker-start: ## Starts a Docker-based backend for development + $(MAKE) -C "./packages/volto/" backend-docker-start -.PHONY: start-backend-docker-detached -start-backend-docker-detached: +.PHONY: backend-docker-detached-start +backend-docker-detached-start: ## Starts a Docker-based backend in detached mode (daemon) docker run -d --rm --name=backend -p 8080:8080 -e SITE=Plone -e ADDONS='$(KGS)' $(DOCKER_IMAGE) -.PHONY: stop-backend-docker-detached -stop-backend-docker-detached: +.PHONY: backend-docker-detached-stop +backend-docker-detached-stop: ## Stops the Docker-based backend in detached mode (daemon) docker kill backend -.PHONY: start-backend-docker-no-cors -start-backend-docker-no-cors: +.PHONY: backend-docker-start-no-cors +backend-docker-start-no-cors: ## Starts the Docker-based backend without CORS in detached mode (daemon) docker run -it --rm --name=backend -p 8080:8080 -e SITE=Plone -e ADDONS='$(KGS)' -e CORS_=true $(DOCKER_IMAGE) -.PHONY: start-frontend-docker -start-frontend-docker: - docker run -it --rm --name=volto --link backend -p 3000:3000 -e RAZZLE_INTERNAL_API_PATH=http://backend:8080/Plone -e RAZZLE_DEV_PROXY_API_PATH=http://backend:8080/Plone plone/plone-frontend:latest - -.PHONY: start-backend-docker-guillotina -start-backend-docker-guillotina: - docker-compose -f g-api/docker-compose.yml up -d - -.PHONY: stop-backend-docker-guillotina -stop-backend-docker-guillotina: - docker-compose -f g-api/docker-compose.yml down +.PHONY: frontend-docker-start +frontend-docker-start: ## Starts a Docker-based frontend for development + $(MAKE) -C "./packages/volto/" frontend-docker-start ##### Acceptance tests (Cypress) ######### Dev mode Acceptance tests -.PHONY: start-test-acceptance-frontend-dev -start-test-acceptance-frontend-dev: build-deps ## Start the Core Acceptance Frontend Fixture in dev mode - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-dev +.PHONY: acceptance-frontend-dev-start +acceptance-frontend-dev-start: ## Start acceptance frontend in development mode + $(MAKE) -C "./packages/volto/" acceptance-frontend-dev-start ######### Core Acceptance tests -.PHONY: start-test-acceptance-server test-acceptance-server -start-test-acceptance-server test-acceptance-server: ## Start Test Acceptance Server Main Fixture (docker container) - $(MAKE) -C "./packages/volto/" start-test-acceptance-server +.PHONY: acceptance-backend-start +acceptance-backend-start: ## Start backend acceptance server + $(MAKE) -C "./packages/volto/" acceptance-backend-start + +.PHONY: ci-acceptance-backend-start +ci-acceptance-backend-start: ## Start backend acceptance server in headless mode for CI + $(MAKE) -C "./packages/volto/" ci-acceptance-backend-start -.PHONY: start-test-acceptance-frontend -start-test-acceptance-frontend: build-deps ## Start the Core Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend +.PHONY: acceptance-frontend-prod-start +acceptance-frontend-prod-start: ## Start acceptance frontend in production mode + $(MAKE) -C "./packages/volto/" acceptance-frontend-prod-start -.PHONY: test-acceptance -test-acceptance: ## Start Core Cypress Acceptance Tests - $(MAKE) -C "./packages/volto/" test-acceptance +.PHONY: acceptance-test +acceptance-test: ## Start Cypress in interactive mode + $(MAKE) -C "./packages/volto/" acceptance-test -.PHONY: test-acceptance-headless -test-acceptance-headless: ## Start Core Cypress Acceptance Tests in headless mode - $(MAKE) -C "./packages/volto/" test-acceptance-headless +.PHONY: ci-acceptance-test +ci-acceptance-test: ## Run cypress tests in headless mode for CI + $(MAKE) -C "./packages/volto/" ci-acceptance-test -.PHONY: full-test-acceptance -full-test-acceptance: ## Runs Core Full Acceptance Testing in headless mode - $(MAKE) -C "./packages/volto/" full-test-acceptance +.PHONY: ci-acceptance-test-run-all +ci-acceptance-test-run-all: ## With a single command, start both the acceptance frontend and backend acceptance server, and run Cypress tests in headless mode + $(MAKE) -C "./packages/volto/" ci-acceptance-test-run-all -######### Seamless Core Acceptance tests +######### Deployment Core Acceptance tests -.PHONY: start-test-acceptance-frontend-seamless -start-test-acceptance-frontend-seamless: build-deps ## Start the Seamless Core Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-seamless +.PHONY: deployment-acceptance-frontend-prod-start +deployment-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for deployment + $(MAKE) -C "./packages/volto/" deployment-acceptance-frontend-prod-start -.PHONY: test-acceptance-seamless -test-acceptance-seamless: ## Start Seamless Cypress Acceptance Tests - $(MAKE) -C "./packages/volto/" test-acceptance-seamless +.PHONY: deployment-acceptance-test +deployment-acceptance-test: ## Start Cypress in interactive mode for tests in deployment + $(MAKE) -C "./packages/volto/" deployment-acceptance-test -.PHONY: start-test-acceptance-webserver-seamless -start-test-acceptance-webserver-seamless: ## Start the seamless webserver - $(MAKE) -C "./packages/volto/" start-test-acceptance-webserver-seamless +.PHONY: deployment-acceptance-web-server-start +deployment-acceptance-web-server-start: ## Start the reverse proxy (Traefik) in port 80 for deployment + $(MAKE) -C "./packages/volto/" deployment-acceptance-web-server-start -.PHONY: full-test-acceptance-seamless -full-test-acceptance-seamless: ## Runs Seamless Core Full Acceptance Testing in headless mode - $(MAKE) -C "./packages/volto/" full-test-acceptance-seamless +.PHONY: deployment-ci-acceptance-test-run-all +deployment-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for deployment tests + $(MAKE) -C "./packages/volto/" deployment-ci-acceptance-test-run-all ######### Project Acceptance tests -.PHONY: start-test-acceptance-frontend-project -start-test-acceptance-frontend-project: build-deps ## Start the Project Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-project +.PHONY: project-acceptance-frontend-prod-start +project-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for project tests + $(MAKE) -C "./packages/volto/" project-acceptance-frontend-prod-start -######### CoreSandbox Acceptance tests +######### Core Sandbox Acceptance tests -.PHONY: start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox -start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox: ## Start CoreSandbox Test Acceptance Server Fixture (docker container) - docker run -it --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox $(DOCKER_IMAGE_ACCEPTANCE) - # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING +.PHONY: coresandbox-acceptance-backend-start +coresandbox-acceptance-backend-start: ## Start backend acceptance server for core sandbox tests + $(MAKE) -C "./packages/volto/" coresandbox-acceptance-backend-start -.PHONY: start-test-acceptance-frontend-coresandbox -start-test-acceptance-frontend-coresandbox: build-deps ## Start the CoreSandbox Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-coresandbox +.PHONY: coresandbox-acceptance-frontend-prod-start +coresandbox-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for core sandbox tests + $(MAKE) -C "./packages/volto/" coresandbox-acceptance-frontend-prod-start -.PHONY: start-test-acceptance-frontend-coresandbox-dev -start-test-acceptance-frontend-coresandbox-dev: build-deps ## Start the CoreSandbox Acceptance Frontend Fixture in dev mode - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-coresandbox-dev +.PHONY: coresandbox-acceptance-frontend-dev-start +coresandbox-acceptance-frontend-dev-start: ## Start acceptance frontend in development mode for core sandbox tests + $(MAKE) -C "./packages/volto/" coresandbox-acceptance-frontend-dev-start -.PHONY: test-acceptance-coresandbox -test-acceptance-coresandbox: ## Start CoreSandbox Cypress Acceptance Tests - $(MAKE) -C "./packages/volto/" test-acceptance-coresandbox +.PHONY: coresandbox-acceptance-test +coresandbox-acceptance-test: ## Start Cypress in interactive mode for core sandbox tests + $(MAKE) -C "./packages/volto/" coresandbox-acceptance-test -.PHONY: test-acceptance-coresandbox-headless -test-acceptance-coresandbox-headless: ## Start CoreSandbox Cypress Acceptance Tests in headless mode - $(MAKE) -C "./packages/volto/" test-acceptance-coresandbox-headless +.PHONY: coresandbox-ci-acceptance-test +coresandbox-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for core sandbox tests + $(MAKE) -C "./packages/volto/" coresandbox-ci-acceptance-test -.PHONY: full-test-acceptance-coresandbox -full-test-acceptance-coresandbox: ## Runs CoreSandbox Full Acceptance Testing in headless mode - $(MAKE) -C "./packages/volto/" full-test-acceptance-coresandbox +.PHONY: coresandbox-ci-acceptance-test-run-all +coresandbox-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for core sandbox tests + $(MAKE) -C "./packages/volto/" coresandbox-ci-acceptance-test-run-all ######### Multilingual Acceptance tests -.PHONY: start-test-acceptance-server-multilingual test-acceptance-server-multilingual -start-test-acceptance-server-multilingual test-acceptance-server-multilingual: ## Start Multilingual Acceptance Server Multilingual Fixture (docker container) - docker run -it --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE_ACCEPTANCE) +.PHONY: multilingual-acceptance-backend-start +multilingual-acceptance-backend-start: ## Start backend acceptance server for multilingual tests + $(MAKE) -C "./packages/volto/" multilingual-acceptance-backend-start -.PHONY: start-test-acceptance-frontend-multilingual -start-test-acceptance-frontend-multilingual: build-deps ## Start the Multilingual Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-multilingual +.PHONY: multilingual-acceptance-frontend-prod-start +multilingual-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for multilingual tests + $(MAKE) -C "./packages/volto/" multilingual-acceptance-frontend-prod-start -.PHONY: test-acceptance-multilingual -test-acceptance-multilingual: ## Start Multilingual Cypress Acceptance Tests - $(MAKE) -C "./packages/volto/" test-acceptance-multilingual +.PHONY: multilingual-acceptance-test +multilingual-acceptance-test: ## Start Cypress in interactive mode for multilingual tests + $(MAKE) -C "./packages/volto/" multilingual-acceptance-test -.PHONY: test-acceptance-multilingual-headless -test-acceptance-multilingual-headless: ## Start Multilingual Cypress Acceptance Tests in headless mode - $(MAKE) -C "./packages/volto/" test-acceptance-multilingual-headless +.PHONY: multilingual-ci-acceptance-test +multilingual-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for multilingual tests + $(MAKE) -C "./packages/volto/" multilingual-ci-acceptance-test -.PHONY: full-test-acceptance-multilingual -full-test-acceptance-multilingual: ## Runs Multilingual Full Acceptance Testing in headless mode - $(MAKE) -C "./packages/volto/" full-test-acceptance-multilingual +.PHONY: multilingual-ci-acceptance-test-run-all +multilingual-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for multilingual tests + $(MAKE) -C "./packages/volto/" multilingual-ci-acceptance-test-run-all -######### Seamless Multilingual Acceptance tests +######### Deployment Multilingual Acceptance tests -.PHONY: start-test-acceptance-server-seamless-multilingual test-acceptance-server-seamless-multilingual -start-test-acceptance-server-seamless-multilingual test-acceptance-server-seamless-multilingual: ## Start Seamless Multilingual Acceptance Server Multilingual Fixture (docker container) - docker run -it --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE_ACCEPTANCE) +.PHONY: deployment-multilingual-acceptance-backend-start +deployment-multilingual-acceptance-backend-start: ## Start backend acceptance server for multilingual tests for deployment + $(MAKE) -C "./packages/volto/" deployment-multilingual-acceptance-backend-start -.PHONY: start-test-acceptance-frontend-seamless-multilingual -start-test-acceptance-frontend-seamless-multilingual: build-deps ## Start the Seamless Multilingual Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-seamless-multilingual +.PHONY: deployment-multilingual-acceptance-frontend-prod-start +deployment-multilingual-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for multilingual tests for deployment + $(MAKE) -C "./packages/volto/" deployment-multilingual-acceptance-frontend-prod-start -.PHONY: test-acceptance-seamless-multilingual -test-acceptance-seamless-multilingual: ## Start Seamless Multilingual Cypress Acceptance Tests - $(MAKE) -C "./packages/volto/" test-acceptance-seamless-multilingual +.PHONY: deployment-multilingual-acceptance-test +deployment-multilingual-acceptance-test: ## Start Cypress in interactive mode for multilingual tests for deployment + $(MAKE) -C "./packages/volto/" deployment-multilingual-acceptance-test -.PHONY: test-acceptance-seamless-multilingual-headless -test-acceptance-seamless-multilingual-headless: ## Start Seamless Multilingual Cypress Acceptance Tests in headless mode - $(MAKE) -C "./packages/volto/" test-acceptance-seamless-multilingual-headless +.PHONY: deployment-multilingual-ci-acceptance-test +deployment-multilingual-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for multilingual tests for deployment + $(MAKE) -C "./packages/volto/" deployment-multilingual-ci-acceptance-test -.PHONY: full-test-acceptance-seamless-multilingual -full-test-acceptance-seamless-multilingual: ## Runs Seamless Multilingual Full Acceptance Testing in headless mode - $(MAKE) -C "./packages/volto/" full-test-acceptance-seamless-multilingual +.PHONY: deployment-multilingual-ci-acceptance-test-run-all +deployment-multilingual-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for multilingual tests for deployment + $(MAKE) -C "./packages/volto/" deployment-multilingual-ci-acceptance-test-run-all -######### WorkingCopy Acceptance tests +######### Working Copy Acceptance tests -.PHONY: start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy -start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy : ## Start the WorkingCopy Acceptance Server Fixture (docker container) - docker run -it --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage $(DOCKER_IMAGE_ACCEPTANCE) - # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.app.iterate,plone.volto,plone.volto.cors APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING +.PHONY: working-copy-acceptance-backend-start +working-copy-acceptance-backend-start: ## Start backend acceptance server for working copy tests + $(MAKE) -C "./packages/volto/" working-copy-acceptance-backend-start -.PHONY: start-test-acceptance-frontend-workingcopy -start-test-acceptance-frontend-workingcopy: build-deps ## Start the WorkingCopy Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-workingcopy +.PHONY: working-copy-acceptance-frontend-prod-start +working-copy-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for working copy tests + $(MAKE) -C "./packages/volto/" working-copy-acceptance-frontend-prod-start -.PHONY: test-acceptance-workingcopy -test-acceptance-workingcopy: ## Start WorkingCopy Cypress Acceptance Tests - $(MAKE) -C "./packages/volto/" test-acceptance-workingcopy +.PHONY: working-copy-acceptance-test +working-copy-acceptance-test: ## Start Cypress in interactive mode for working copy tests + $(MAKE) -C "./packages/volto/" working-copy-acceptance-test -.PHONY: test-acceptance-workingcopy-headless -test-acceptance-workingcopy-headless: ## Start WorkingCopy Cypress Acceptance Tests in headless mode - $(MAKE) -C "./packages/volto/" test-acceptance-workingcopy-headless +.PHONY: working-copy-ci-acceptance-test +working-copy-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for working copy tests + $(MAKE) -C "./packages/volto/" working-copy-ci-acceptance-test -.PHONY: full-test-acceptance-workingcopy -full-test-acceptance-workingcopy: ## Runs WorkingCopy Full Acceptance Testing in headless mode - $(MAKE) -C "./packages/volto/" full-test-acceptance-workingcopy +.PHONY: working-copy-ci-acceptance-test-run-all +working-copy-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for working copy tests + $(MAKE) -C "./packages/volto/" working-copy-ci-acceptance-test-run-all ######### Guillotina Acceptance tests -.PHONY: start-test-acceptance-server-guillotina -start-test-acceptance-server-guillotina: ## Start Guillotina Test Acceptance Server (docker container) +.PHONY: guillotina-acceptance-backend-start +guillotina-acceptance-backend-start: ## Start backend acceptance server for Guillotina tests docker-compose -f g-api/docker-compose.yml up > /dev/null -.PHONY: start-test-acceptance-frontend-guillotina -start-test-acceptance-frontend-guillotina: build-deps ## Start the Guillotina Acceptance Frontend Fixture - $(MAKE) -C "./packages/volto/" start-test-acceptance-frontend-guillotina +.PHONY: guillotina-acceptance-frontend-prod-start +guillotina-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for Guillotina tests + $(MAKE) -C "./packages/volto/" guillotina-acceptance-frontend-prod-start -.PHONY: test-acceptance-guillotina -test-acceptance-guillotina: ## Start the Guillotina Cypress Acceptance Tests - $(MAKE) -C "./packages/volto/" test-acceptance-guillotina +.PHONY: guillotina-acceptance-test +guillotina-acceptance-test: ## Start Cypress in interactive mode for Guillotina tests + $(MAKE) -C "./packages/volto/" guillotina-acceptance-test -.PHONY: test-acceptance-guillotina-headless -test-acceptance-guillotina-headless: ## Start the Guillotina Cypress Acceptance Tests in headless mode - $(MAKE) -C "./packages/volto/" test-acceptance-guillotina-headless +.PHONY: guillotina-ci-acceptance-test +guillotina-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for Guillotina tests + $(MAKE) -C "./packages/volto/" guillotina-ci-acceptance-test -.PHONY: full-test-acceptance-guillotina -full-test-acceptance-guillotina: ## Runs the Guillotina Full Acceptance Testing in headless mode - $(MAKE) -C "./packages/volto/" full-test-acceptance-guillotina +.PHONY: guillotina-ci-acceptance-test-run-all +guillotina-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for Guillotina tests + $(MAKE) -C "./packages/volto/" guillotina-ci-acceptance-test-run-all ######### Plone 5 Acceptance tests -.PHONY: start-test-acceptance-server-5 -start-test-acceptance-server-5: ## Start Test Acceptance Server Main Fixture Plone 5 (docker container) - docker run -it --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e ADDONS='$(KGS5) $(TESTING_ADDONS)' -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors $(DOCKER_IMAGE5) ./bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING +.PHONY: plone5-acceptance-backend-start +plone5-acceptance-backend-start: ## Start backend acceptance server for Plone 5 tests + $(MAKE) -C "./packages/volto/" plone5-acceptance-backend-start ######### @plone/client -.PHONY: start-test-acceptance-server-detached -start-test-acceptance-server-detached: ## Start Test Acceptance Server Main Fixture (docker container) in a detached (daemon) mode +.PHONY: acceptance-server-detached-start +acceptance-server-detached-start: ## Starts test acceptance server main fixture in detached mode (daemon) docker run -d --name plone-client-acceptance-server -i --rm -p 55001:55001 $(DOCKER_IMAGE_ACCEPTANCE) -.PHONY: stop-test-acceptance-server-detached -stop-test-acceptance-server-detached: ## Stop Test Acceptance Server Main Fixture (docker container) in a detached (daemon) mode +.PHONY: acceptance-server-detached-stop +acceptance-server-detached-stop: ## Stop test acceptance server main fixture in detached mode (daemon) docker kill plone-client-acceptance-server # include local overrides if present diff --git a/apps/nextjs/README.md b/apps/nextjs/README.md index 687905853e..88a23215b6 100644 --- a/apps/nextjs/README.md +++ b/apps/nextjs/README.md @@ -15,7 +15,7 @@ pnpm --filter plone-nextjs run dev Then start the Plone backend: ```shell -make start-backend-docker +make backend-docker-start ``` ## Deployment at Vercel diff --git a/apps/plone/.gitignore b/apps/plone/.gitignore index 8dd6203312..a8b3ab728b 100644 --- a/apps/plone/.gitignore +++ b/apps/plone/.gitignore @@ -28,20 +28,6 @@ lighthouse-report.html *~ # Python -/api/.installed.cfg -/api/.mr.developer.cfg -/api/bin/ -/api/develop-eggs/ -/api/eggs/ -/api/include/ -/api/lib/ -/api/lib64/ -/api/notebook/env/ -/api/parts/ -/api/share/python-wheels/ -/api/src/ -/api/var/ -/api/venv/ /bin/ /lib/ .Python @@ -93,4 +79,4 @@ src/addons/* !.yarn/sdks !.yarn/versions -!src/addons/volto-volto-project \ No newline at end of file +!src/addons/volto-volto-project diff --git a/apps/remix/README.md b/apps/remix/README.md index de9880b2f6..a339650494 100644 --- a/apps/remix/README.md +++ b/apps/remix/README.md @@ -15,8 +15,9 @@ pnpm --filter plone-remix run dev Then start the Plone backend: +% TODO MAKEFILE ```shell -make start-backend-docker +make backend-docker-start ``` diff --git a/docs/source/contributing/acceptance-tests.md b/docs/source/contributing/acceptance-tests.md index f777d12a09..6dd2a313ca 100644 --- a/docs/source/contributing/acceptance-tests.md +++ b/docs/source/contributing/acceptance-tests.md @@ -30,19 +30,19 @@ All sessions should start from the `packages/volto` directory. 1. In the first session, start the backend server. ```shell - make start-test-acceptance-server + make acceptance-backend-start ``` 1. In the second session, start the frontend server. ```shell - make start-test-acceptance-frontend-dev + make acceptance-frontend-dev-start ``` 1. In the third session, start the Cypress tests runner. ```shell - make test-acceptance + make acceptance-test ``` 1. In the Cypress pop-up test style, choose `E2E Testing`, since Volto's tests are end-to-end tests. @@ -52,7 +52,7 @@ All sessions should start from the `packages/volto` directory. 1. In the main Cypress runner section, you will see all of the test specs that Volto developers have written to test Volto and its packages. -1. To run a test, interact with the file based tree that displays all possible tests to run, and click on the test spec you need to run. +1. To run a test, interact with the file based tree that displays all possible tests to run, and click on the test spec you need to run. We provide the following major test specs: diff --git a/docs/source/contributing/developing-core.md b/docs/source/contributing/developing-core.md index b71167884c..c1e259e387 100644 --- a/docs/source/contributing/developing-core.md +++ b/docs/source/contributing/developing-core.md @@ -168,7 +168,7 @@ For both sessions, change your working directory to the root of your Volto clone In the first session, start the backend. ```shell -make start-backend-docker +make backend-docker-start ``` When you run this command for the first time, it will download Docker images, configure the backend, and start the backend. diff --git a/docs/source/upgrade-guide/index.md b/docs/source/upgrade-guide/index.md index 5d89860e86..2b3cfcbf00 100644 --- a/docs/source/upgrade-guide/index.md +++ b/docs/source/upgrade-guide/index.md @@ -241,6 +241,105 @@ This allows more expressive conditions to fulfill the use case of the `Add` form The mechanism to detect if a block is a container or not has been improved and the config setting `config.settings.containerBlockTypes` is no longer needed, and core won't check for it anymore. +### New naming convention for `Makefile` commands + +A new naming convention for `Makefile` commands has been implemented in Volto 18. +This convention has been applied to all Volto tools, including the new boilerplate generators that use cookiecutter. +The conventions is as follows: + +- Use kebab-case, where each word is separated by a hyphen. +- Use hierarchical or taxonomic ranking, where the thing being operated upon is defined by `[thing]-[subthing]-[subsubthing]`. +- `[thing]` may be omitted when it is the project itself. +- The final term is the action to be performed upon the `[thing]`. + +Every Makefile command now has a description. +To view a complete list of Makefile commands with their description, you can issue the following command. + +```shell +make help +``` + +The following table lists the old and new Makefile commands and the new commands' description. + +| Command | Revised Command | Revised Description | Comments | +|---|---|---|---| +| help | help | Show this help | | +| start | start | Starts Volto, allowing reloading of the add-on during development | | +| start-frontend | | | Removed | +| build | build | Build a production bundle for distribution | Added | +| build-frontend | | | Removed | +| test | test | Run unit tests | | +| clean | clean | Clean development environment | | +| setup | install | Set up development environment | Renamed to be consistent with the add-on setups | +| bin/python | bin/python | Create a Python virtual environment with the latest pip, and install documentation requirements | | +| docs-clean | docs-clean | Clean current and legacy docs build directories, and Python virtual environment | | +| docs-news | docs-news | Create or update the symlink from docs to volto package | | +| docs-html | docs-html | Build html | | +| docs-livehtml | docs-livehtml | Rebuild Sphinx documentation on changes, with live-reload in the browser | | +| docs-linkcheck | docs-linkcheck | Run linkcheck | | +| docs-linkcheckbroken | docs-linkcheckbroken | Run linkcheck and show only broken links | | +| docs-vale | docs-vale | Install (once) and run Vale style, grammar, and spell checks | | +| rtd-pr-preview | docs-rtd-pr-preview | Build previews of pull requests that have documentation changes on Read the Docs via CI | | +| docs-test | docs-test | Clean docs build, then run linkcheckbroken, vale | | +| copyreleasenotestodocs | release-notes-copy-to-docs | Copy release notes into documentation | | +| storybook-build | storybook-build | Build Storybook | | +| | storybook-start | Start Storybook server on port 6006 | Added | +| patches | | | Removed | +| cypress-install | cypress-install | Install Cypress for acceptance tests | | +| build-deps | build-deps | Build dependencies | | +| corepackagebump | | | Removed | +| start-backend-docker | backend-docker-start | Starts a Docker-based backend for development | | +| start-backend-docker-detached | backend-docker-detached-start | Starts a Docker-based backend in detached mode (daemon) | | +| stop-backend-docker-detached | backend-docker-detached-stop | Stops the Docker-based backend in detached mode (daemon) | | +| start-backend-docker-no-cors | backend-docker-start-no-cors | Starts the Docker-based backend without CORS in detached mode (daemon) | | +| start-frontend-docker | frontend-docker-start | Starts a Docker-based frontend for development | | +| start-backend-docker-guillotina | | | Removed | +| stop-backend-docker-guillotina | | | Removed | +| start-test-acceptance-frontend-dev | acceptance-frontend-dev-start | Start acceptance frontend in development mode | | +| test-acceptance-server | acceptance-backend-start | Start backend acceptance server | | +| start-test-acceptance-server | ci-acceptance-backend-start | Start backend acceptance server in headless mode for CI | | +| start-test-acceptance-frontend | acceptance-frontend-prod-start | Start acceptance frontend in production mode | | +| test-acceptance | acceptance-test | Start Cypress in interactive mode | | +| test-acceptance-headless | ci-acceptance-test | Run Cypress tests in headless mode for CI | | +| full-test-acceptance | ci-acceptance-test-run-all | With a single command, start both the acceptance frontend and backend acceptance server, and run Cypress tests in headless mode | | +| start-test-acceptance-frontend-seamless | deployment-acceptance-frontend-prod-start | Start acceptance frontend in production mode for deployment | | +| test-acceptance-seamless | deployment-acceptance-test | Start Cypress in interactive mode for tests in deployment | | +| start-test-acceptance-web-server-seamless | deployment-acceptance-web-server-start | Start the reverse proxy (Traefik) on port 80 for deployment | | +| full-test-acceptance-seamless | deployment-ci-acceptance-test-run-all | Run in one command the backend, frontend, and the cypress tests in headless mode for CI for deployment | | +| start-test-acceptance-frontend-project | project-acceptance-frontend-prod-start | Start acceptance frontend in production mode for project tests | | +| start-test-acceptance-server-coresandbox | coresandbox-acceptance-backend-start | Start backend acceptance server for core sandbox tests | | +| start-test-acceptance-frontend-coresandbox | coresandbox-acceptance-frontend-prod-start | Start acceptance frontend in production mode for core sandbox tests | | +| start-test-acceptance-frontend-coresandbox-dev | coresandbox-acceptance-frontend-dev-start | Start acceptance frontend in development mode for core sandbox tests | | +| test-acceptance-coresandbox | coresandbox-acceptance-test | Start Cypress in interactive mode for core sandbox tests | | +| test-acceptance-coresandbox-headless | coresandbox-ci-acceptance-test | Run Cypress tests in headless mode for CI for core sandbox tests | | +| full-test-acceptance-coresandbox | coresandbox-ci-acceptance-test-run-all | With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for core sandbox tests | | +| start-test-acceptance-server-multilingual | multilingual-acceptance-backend-start | Start backend acceptance server for multilingual tests | | +| start-test-acceptance-frontend-multilingual | multilingual-acceptance-frontend-prod-start | Start acceptance frontend in production mode for multilingual tests | | +| test-acceptance-multilingual | multilingual-acceptance-test | Start Cypress in interactive mode for multilingual tests | | +| test-acceptance-multilingual-headless | multilingual-ci-acceptance-test | Run Cypress tests in headless mode for CI for multilingual tests | | +| full-test-acceptance-multilingual | multilingual-ci-acceptance-test-run-all | With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for multilingual tests | | +| start-test-acceptance-server-seamless-multilingual | deployment-multilingual-acceptance-backend-start | Start backend acceptance server for multilingual tests for deployment | | +| start-test-acceptance-frontend-seamless-multilingual | deployment-multilingual-acceptance-frontend-prod-start | Start acceptance frontend in production mode for multilingual tests for deployment | | +| test-acceptance-seamless-multilingual | deployment-multilingual-acceptance-test | Start Cypress in interactive mode for multilingual tests for deployment | | +| test-acceptance-seamless-multilingual-headless | deployment-multilingual-ci-acceptance-test | Run Cypress tests in headless mode for CI for multilingual tests for deployment | | +| full-test-acceptance-seamless-multilingual | deployment-multilingual-ci-acceptance-test-run-all | With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for multilingual tests for deployment | | +| start-test-acceptance-server-workingcopy | working-copy-acceptance-backend-start | Start backend acceptance server for working copy tests | | +| start-test-acceptance-frontend-workingcopy | working-copy-acceptance-frontend-prod-start | Start acceptance frontend in production mode for working copy tests | | +| test-acceptance-workingcopy | working-copy-acceptance-test | Start Cypress in interactive mode for working copy tests | | +| test-acceptance-workingcopy-headless | working-copy-ci-acceptance-test | Run Cypress tests in headless mode for CI for working copy tests | | +| full-test-acceptance-workingcopy | working-copy-ci-acceptance-test-run-all | With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for working copy tests | | +| start-test-acceptance-server-guillotina | guillotina-acceptance-backend-start | Start backend acceptance server for Guillotina tests | | +| start-test-acceptance-frontend-guillotina | guillotina-acceptance-frontend-prod-start | Start acceptance frontend in production mode for Guillotina tests | | +| test-acceptance-guillotina | guillotina-acceptance-test | Start Cypress in interactive mode for Guillotina tests | | +| test-acceptance-guillotina-headless | guillotina-ci-acceptance-test | Run Cypress tests in headless mode for CI for Guillotina tests | | +| full-test-acceptance-guillotina | guillotina-ci-acceptance-test-run-all | With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for Guillotina tests | | +| start-test-acceptance-server-5 | plone5-acceptance-backend-start | Start backend acceptance server for Plone 5 tests | | +| start-test-acceptance-server-detached | acceptance-server-detached-start | Starts test acceptance server main fixture in detached mode (daemon) | | +| stop-test-acceptance-server-detached | acceptance-server-detached-stop | Stop test acceptance server main fixture in detached mode (daemon) | | + + +The documentation has been updated as well to reflect this change. + (volto-upgrade-guide-17.x.x)= ## Upgrading to Volto 17.x.x diff --git a/g-api/README.md b/g-api/README.md index c86a915e31..ede22947d9 100644 --- a/g-api/README.md +++ b/g-api/README.md @@ -9,9 +9,3 @@ _Disclaimer:_ Guillotina doesn't support the full API/features that Plone provid ```shell docker-compose -f g-api/docker-compose.yml up -d ``` - -or using the convenience makefile command: - -```shell -make start-backend-docker-guillotina -``` diff --git a/package.json b/package.json index dccd226ba0..c5be31bcc6 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,6 @@ "private": true, "scripts": { "preinstall": "npx only-allow pnpm", - "postinstall": "make setup", "watch": "pnpm --filter @plone/registry --filter @plone/client --filter @plone/components --filter @plone/providers watch", "build:deps": "pnpm --filter @plone/registry build", "build:all": "pnpm --filter @plone/registry --filter @plone/client --filter @plone/components --filter @plone/providers build", diff --git a/packages/volto/.gitignore b/packages/volto/.gitignore index af42039b56..6d1cc045b4 100644 --- a/packages/volto/.gitignore +++ b/packages/volto/.gitignore @@ -32,32 +32,6 @@ lighthouse-report.html /.settings/ .*project -# Python -/api/.installed.cfg -/api/.mr.developer.cfg -/api/bin/ -/api/develop-eggs/ -/api/eggs/ -/api/include/ -/api/lib/ -/api/lib64/ -/api/notebook/env/ -/api/parts/ -/api/share/python-wheels/ -/api/src/ -/api/test/ -/api/var/ -/api/venv/ -/bin/ -/lib/ -.Python -include -pip-selfcheck.json -pyvenv.cfg -share -/api/lib64 -lib64 - # locales locales/*.json diff --git a/packages/volto/Makefile b/packages/volto/Makefile index 35fcd4ed5e..51236a9395 100644 --- a/packages/volto/Makefile +++ b/packages/volto/Makefile @@ -15,10 +15,10 @@ include ../../variables.mk # Recipe snippets for reuse -CHECKOUT_BASENAME=$(shell basename $(shell realpath ./)) +CHECKOUT_BASENAME="$(shell basename $(shell realpath ./))" CHECKOUT_BRANCH=$(shell git branch --show-current) CHECKOUT_TMP=../$(CHECKOUT_BASENAME).tmp -CHECKOUT_TMP_ABS=$(shell realpath $(CHECKOUT_TMP)) +CHECKOUT_TMP_ABS="$(shell realpath $(CHECKOUT_TMP))" # We like colors # From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects @@ -31,246 +31,256 @@ YELLOW=`tput setaf 3` # Top-level targets .PHONY: all -all: build +all: help # Add the following 'help' target to your Makefile -# And add help text after each target name starting with '\#\#' +# and add help text after each target name starting with ' ##' +# to return a pretty list of targets and their descriptions. .PHONY: help -help: .SHELLFLAGS:=-eu -o pipefail -O inherit_errexit -c help: ## This help message - @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)" -# TODO: Review release commands for all packages -# Use TurboRepo +.PHONY: start +start: ## Starts Volto, allowing reloading of the add-on during development + pnpm start -.PHONY: build-frontend -build-frontend: +.PHONY: build +build: ## Build a production bundle for distribution pnpm i && RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm build +.PHONY: test +test: ## Run unit tests + pnpm test + .PHONY: clean -clean: +clean: ## Clean development environment rm -rf node_modules -##### Build - -.PHONY: storybook-build -storybook-build: build-deps - pnpm build-storybook -o ../../docs/_build/storybook +.PHONY: install +install: build-deps ## Set up development environment + # Setup ESlint for VSCode + node packages/scripts/vscodesettings.js -.PHONY: patches -patches: - /bin/bash patches/patchit.sh > /dev/null 2>&1 ||true +##### Build .PHONY: cypress-install -cypress-install: +cypress-install: ## Install Cypress for acceptance tests $(NODEBIN)/cypress install +../registry/dist: ../registry/src + (cd ../../ && pnpm build:registry) + +../components/dist: ../components/src + (cd ../../ && pnpm build:components) + .PHONY: build-deps -build-deps: - @if [ ! -d $$(pwd)/../registry/dist ] || [ $$(find $$(pwd)/../registry -newer $$(pwd)/../registry/dist -print -quit) ]; then \ - (cd ../../ && pnpm build:deps); \ - fi +build-deps: ../registry/dist ## Build dependencies +## Storybook + +.PHONY: storybook-start +storybook-start: ## Start Storybook server on port 6006 + @echo "$(GREEN)==> Start Storybook$(RESET)" + pnpm run storybook + +.PHONY: storybook-build +storybook-build: build-deps ## Build Storybook + pnpm build-storybook -o ../../docs/_build/html/storybook ##### Release (it runs the one inside) -.PHONY: copyreleasenotestodocs -copyreleasenotestodocs: +.PHONY: release-notes-copy-to-docs +release-notes-copy-to-docs: ## Copy release notes into documentation cp CHANGELOG.md ../../docs/source/release-notes/index.md git add ../../docs/source/release-notes/index.md ##### Docker containers -.PHONY: start-backend-docker -start-backend-docker: +.PHONY: backend-docker-start +backend-docker-start: ## Starts a Docker-based backend for development docker run -it --rm --name=backend -p 8080:8080 -e SITE=Plone -e ADDONS='$(KGS)' $(DOCKER_IMAGE) -.PHONY: start-frontend-docker -start-frontend-docker: +.PHONY: frontend-docker-start +frontend-docker-start: ## Starts a Docker-based frontend for development docker run -it --rm --name=volto --link backend -p 3000:3000 -e RAZZLE_INTERNAL_API_PATH=http://backend:8080/Plone -e RAZZLE_DEV_PROXY_API_PATH=http://backend:8080/Plone plone/plone-frontend:latest -.PHONY: start-backend-docker-guillotina -start-backend-docker-guillotina: - docker-compose -f ../../g-api/docker-compose.yml up -d - -.PHONY: stop-backend-docker-guillotina -stop-backend-docker-guillotina: - docker-compose -f ../../g-api/docker-compose.yml down - ##### Acceptance tests (Cypress) ######### Dev mode Acceptance tests -.PHONY: start-test-acceptance-frontend-dev -start-test-acceptance-frontend-dev: build-deps ## Start the Core Acceptance Frontend Fixture in dev mode +.PHONY: acceptance-frontend-dev-start +acceptance-frontend-dev-start: ## Start acceptance frontend in development mode RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm start ######### Core Acceptance tests -.PHONY: start-test-acceptance-server test-acceptance-server -start-test-acceptance-server test-acceptance-server: ## Start Test Acceptance Server Main Fixture (docker container) - # Temporarily not using the official acceptance docker image because we wan to use the latest version of plone.restapi - # docker run -i --rm -p 55001:55001 $(DOCKER_IMAGE_ACCEPTANCE) - # Uncomment next and comment above to use a custom image with the acceptance server (in case you need to use an specific backend add-on or version) +.PHONY: acceptance-backend-start +acceptance-backend-start: ## Start backend acceptance server + #docker run -it --rm -p 55001:55001 $(DOCKER_IMAGE_ACCEPTANCE) + # Uncomment next line and comment line above to use a custom image with the acceptance server (in case you need to use an specific backend add-on or version) + docker run -it --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e ADDONS='$(KGS) $(TESTING_ADDONS)' -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors $(DOCKER_IMAGE) ./bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING + +.PHONY: ci-acceptance-backend-start +ci-acceptance-backend-start: ## Start backend acceptance server in headless mode for CI + #docker run -i --rm -p 55001:55001 $(DOCKER_IMAGE_ACCEPTANCE) + # Uncomment next line and comment line above to use a custom image with the acceptance server (in case you need to use an specific backend add-on or version) docker run -i --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e ADDONS='$(KGS) $(TESTING_ADDONS)' -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors $(DOCKER_IMAGE) ./bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING -.PHONY: start-test-acceptance-frontend -start-test-acceptance-frontend: build-deps ## Start the Core Acceptance Frontend Fixture +.PHONY: acceptance-frontend-prod-start +acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm build && pnpm start:prod -.PHONY: test-acceptance -test-acceptance: ## Start Core Cypress Acceptance Tests +.PHONY: acceptance-test +acceptance-test: ## Start Cypress in interactive mode NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress open -.PHONY: test-acceptance-headless -test-acceptance-headless: ## Start Core Cypress Acceptance Tests in headless mode +.PHONY: ci-acceptance-test +ci-acceptance-test: ## Run cypress tests in headless mode for CI NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress run --config specPattern='cypress/tests/core/**/*.{js,jsx,ts,tsx}' -.PHONY: full-test-acceptance -full-test-acceptance: ## Runs Core Full Acceptance Testing in headless mode - $(NODEBIN)/start-test "make start-test-acceptance-server" http-get://127.0.0.1:55001/plone "make start-test-acceptance-frontend" http://127.0.0.1:3000 "make test-acceptance-headless" +.PHONY: ci-acceptance-test-run-all +ci-acceptance-test-run-all: ## With a single command, start both the acceptance frontend and backend acceptance server, and run Cypress tests in headless mode + $(NODEBIN)/start-test "make ci-acceptance-backend-start" http-get://127.0.0.1:55001/plone "make acceptance-frontend-prod-start" http://127.0.0.1:3000 "make ci-acceptance-test" -######### Seamless Core Acceptance tests +######### Deployment Core Acceptance tests -.PHONY: start-test-acceptance-frontend-seamless -start-test-acceptance-frontend-seamless: build-deps ## Start the Seamless Core Acceptance Frontend Fixture +.PHONY: deployment-acceptance-frontend-prod-start +deployment-acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode for deployment pnpm build && pnpm start:prod -.PHONY: test-acceptance-seamless -test-acceptance-seamless: ## Start Seamless Cypress Acceptance Tests +.PHONY: deployment-acceptance-test +deployment-acceptance-test: ## Start Cypress in interactive mode for tests in deployment NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress open --config baseUrl='http://localhost' -.PHONY: start-test-acceptance-webserver-seamless -start-test-acceptance-webserver-seamless: ## Start the seamless webserver +.PHONY: deployment-acceptance-web-server-start +deployment-acceptance-web-server-start: ## Start the reverse proxy (Traefik) in port 80 for deployment cd cypress/docker && docker-compose -f seamless.yml up -.PHONY: full-test-acceptance-seamless -full-test-acceptance-seamless: ## Runs Seamless Core Full Acceptance Testing in headless mode - $(NODEBIN)/start-test "make start-test-acceptance-server" http-get://127.0.0.1:55001/plone "make start-test-acceptance-frontend-seamless" http://127.0.0.1:3000 "make test-acceptance-headless" +.PHONY: deployment-ci-acceptance-test-run-all +deployment-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for deployment tests + $(NODEBIN)/start-test "make acceptance-backend-start" http-get://127.0.0.1:55001/plone "make deployment-acceptance-frontend-prod-start" http://127.0.0.1:3000 "make ci-acceptance-test" ######### Project Acceptance tests -.PHONY: start-test-acceptance-frontend-project -start-test-acceptance-frontend-project: ## Start the Project Acceptance Frontend Fixture +.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 && RAZZLE_API_PATH=http://127.0.0.1:55001/plone yarn build && yarn start:prod) -######### CoreSandbox Acceptance tests +######### Core Sandbox Acceptance tests -.PHONY: start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox -start-test-acceptance-server-coresandbox test-acceptance-server-coresandbox: ## Start CoreSandbox Test Acceptance Server Fixture (docker container) +.PHONY: coresandbox-acceptance-backend-start +coresandbox-acceptance-backend-start: ## Start backend acceptance server for core sandbox tests docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox $(DOCKER_IMAGE_ACCEPTANCE) - # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors,plone.volto.coresandbox APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage,plone.volto:coresandbox ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING -.PHONY: start-test-acceptance-frontend-coresandbox -start-test-acceptance-frontend-coresandbox: build-deps ## Start the CoreSandbox Acceptance Frontend Fixture +.PHONY: coresandbox-acceptance-frontend-prod-start +coresandbox-acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode for core sandbox tests ADDONS=@plone/volto-coresandbox RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm build && pnpm start:prod -.PHONY: start-test-acceptance-frontend-coresandbox-dev -start-test-acceptance-frontend-coresandbox-dev: build-deps ## Start the CoreSandbox Acceptance Frontend Fixture in dev mode +.PHONY: coresandbox-acceptance-frontend-dev-start +coresandbox-acceptance-frontend-dev-start: build-deps ## Start acceptance frontend in development mode for core sandbox tests ADDONS=@plone/volto-coresandbox RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm start -.PHONY: test-acceptance-coresandbox -test-acceptance-coresandbox: ## Start CoreSandbox Cypress Acceptance Tests +.PHONY: coresandbox-acceptance-test +coresandbox-acceptance-test: ## Start Cypress in interactive mode for core sandbox tests NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress open --config specPattern='cypress/tests/coresandbox/**/*.{js,jsx,ts,tsx}' -.PHONY: test-acceptance-coresandbox-headless -test-acceptance-coresandbox-headless: ## Start CoreSandbox Cypress Acceptance Tests in headless mode +.PHONY: coresandbox-ci-acceptance-test +coresandbox-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for core sandbox tests NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress run --config specPattern='cypress/tests/coresandbox/**/*.{js,jsx,ts,tsx}' -.PHONY: full-test-acceptance-coresandbox -full-test-acceptance-coresandbox: ## Runs CoreSandbox Full Acceptance Testing in headless mode - $(NODEBIN)/start-test "make start-test-acceptance-server-coresandbox" http-get://127.0.0.1:55001/plone "make start-test-acceptance-frontend-coresandbox" http://127.0.0.1:3000 "make test-acceptance-coresandbox-headless" +.PHONY: coresandbox-ci-acceptance-test-run-all +coresandbox-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for core sandbox tests + $(NODEBIN)/start-test "make coresandbox-acceptance-backend-start" http-get://127.0.0.1:55001/plone "make coresandbox-acceptance-frontend-prod-start" http://127.0.0.1:3000 "make coresandbox-ci-acceptance-test" ######### Multilingual Acceptance tests -.PHONY: start-test-acceptance-server-multilingual test-acceptance-server-multilingual -start-test-acceptance-server-multilingual test-acceptance-server-multilingual: ## Start Multilingual Acceptance Server Multilingual Fixture (docker container) +.PHONY: multilingual-acceptance-backend-start +multilingual-acceptance-backend-start: ## Start backend acceptance server for multilingual tests docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE_ACCEPTANCE) -.PHONY: start-test-acceptance-frontend-multilingual -start-test-acceptance-frontend-multilingual: build-deps ## Start the Multilingual Acceptance Frontend Fixture +.PHONY: multilingual-acceptance-frontend-prod-start +multilingual-acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode for multilingual tests ADDONS=@plone/volto-coresandbox:multilingualFixture RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm build && pnpm start:prod -.PHONY: test-acceptance-multilingual -test-acceptance-multilingual: ## Start Multilingual Cypress Acceptance Tests +.PHONY: multilingual-acceptance-test +multilingual-acceptance-test: ## Start Cypress in interactive mode for multilingual tests NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress open --config specPattern='cypress/tests/multilingual/**/*.{js,jsx,ts,tsx}' -.PHONY: test-acceptance-multilingual-headless -test-acceptance-multilingual-headless: ## Start Multilingual Cypress Acceptance Tests in headless mode +.PHONY: multilingual-ci-acceptance-test +multilingual-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for multilingual tests NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress run --config specPattern='cypress/tests/multilingual/**/*.{js,jsx,ts,tsx}' -.PHONY: full-test-acceptance-multilingual -full-test-acceptance-multilingual: ## Runs Multilingual Full Acceptance Testing in headless mode - $(NODEBIN)/start-test "make start-test-acceptance-server-multilingual" http-get://127.0.0.1:55001/plone "make start-test-acceptance-frontend-multilingual" http://127.0.0.1:3000 "make test-acceptance-multilingual-headless" +.PHONY: multilingual-ci-acceptance-test-run-all +multilingual-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for multilingual tests + $(NODEBIN)/start-test "make multilingual-acceptance-backend-start" http-get://127.0.0.1:55001/plone "make multilingual-acceptance-frontend-prod-start" http://127.0.0.1:3000 "make multilingual-ci-acceptance-test" -######### Seamless Multilingual Acceptance tests +######### Deployment Multilingual Acceptance tests -.PHONY: start-test-acceptance-server-seamless-multilingual test-acceptance-server-seamless-multilingual -start-test-acceptance-server-seamless-multilingual test-acceptance-server-seamless-multilingual: ## Start Seamless Multilingual Acceptance Server Multilingual Fixture (docker container) +.PHONY: deployment-multilingual-acceptance-backend-start +deployment-multilingual-acceptance-backend-start: ## Start backend acceptance server for multilingual tests for deployment docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:multilingual $(DOCKER_IMAGE_ACCEPTANCE) -.PHONY: start-test-acceptance-frontend-seamless-multilingual -start-test-acceptance-frontend-seamless-multilingual: build-deps ## Start the Seamless Multilingual Acceptance Frontend Fixture +.PHONY: deployment-multilingual-acceptance-frontend-prod-start +deployment-multilingual-acceptance-frontend-prod-start: build-deps ##Start acceptance frontend in production mode for multilingual tests for deployment ADDONS=@plone/volto-coresandbox:multilingualFixture pnpm build && pnpm start:prod -.PHONY: test-acceptance-seamless-multilingual -test-acceptance-seamless-multilingual: ## Start Seamless Multilingual Cypress Acceptance Tests +.PHONY: deployment-multilingual-acceptance-test +deployment-multilingual-acceptance-test: ## Start Cypress in interactive mode for multilingual tests for deployment NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress open --config baseUrl='http://localhost',specPattern='cypress/tests/multilingual/**/*.{js,jsx,ts,tsx}' -.PHONY: test-acceptance-seamless-multilingual-headless -test-acceptance-seamless-multilingual-headless: ## Start Seamless Multilingual Cypress Acceptance Tests in headless mode +.PHONY: deployment-multilingual-ci-acceptance-test +deployment-multilingual-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for multilingual tests for deployment NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress run --config specPattern='cypress/tests/multilingual/**/*.{js,jsx,ts,tsx}' -.PHONY: full-test-acceptance-seamless-multilingual -full-test-acceptance-seamless-multilingual: ## Runs Seamless Multilingual Full Acceptance Testing in headless mode - $(NODEBIN)/start-test "make start-test-acceptance-server-seamless-multilingual" http-get://127.0.0.1:55001/plone "make start-test-acceptance-frontend-seamless-multilingual" http://127.0.0.1:3000 "make test-acceptance-multilingual-headless" +.PHONY: deployment-multilingual-ci-acceptance-test-run-all +deployment-multilingual-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for multilingual tests for deployment + $(NODEBIN)/start-test "make deployment-multilingual-acceptance-backend-start" http-get://127.0.0.1:55001/plone "make deployment-multilingual-acceptance-frontend-prod-start" http://127.0.0.1:3000 "make deployment-multilingual-ci-acceptance-test" -######### WorkingCopy Acceptance tests +######### Working Copy Acceptance tests -.PHONY: start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy -start-test-acceptance-server-workingcopy test-acceptance-server-workingcopy : ## Start the WorkingCopy Acceptance Server Fixture (docker container) +.PHONY: working-copy-acceptance-backend-start +working-copy-acceptance-backend-start: ## Start backend acceptance server for working copy tests docker run -i --rm -p 55001:55001 -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage $(DOCKER_IMAGE_ACCEPTANCE) - # ZSERVER_PORT=55001 CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.app.iterate,plone.volto,plone.volto.cors APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.app.iterate:default,plone.volto:default-homepage ./api/bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING -.PHONY: start-test-acceptance-frontend-workingcopy -start-test-acceptance-frontend-workingcopy: build-deps ## Start the WorkingCopy Acceptance Frontend Fixture +.PHONY: working-copy-acceptance-frontend-prod-start +working-copy-acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode for working copy tests ADDONS=@plone/volto-coresandbox:workingCopyFixture RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm build && pnpm start:prod -.PHONY: test-acceptance-workingcopy -test-acceptance-workingcopy: ## Start WorkingCopy Cypress Acceptance Tests +.PHONY: working-copy-acceptance-test +working-copy-acceptance-test: ## Start Cypress in interactive mode for working copy tests NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress open --config specPattern='cypress/tests/workingCopy/**/*.{js,jsx,ts,tsx}' -.PHONY: test-acceptance-workingcopy-headless -test-acceptance-workingcopy-headless: ## Start WorkingCopy Cypress Acceptance Tests in headless mode +.PHONY: working-copy-ci-acceptance-test +working-copy-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for working copy tests NODE_ENV=production CYPRESS_API=plone $(NODEBIN)/cypress run --config specPattern='cypress/tests/workingCopy/**/*.{js,jsx,ts,tsx}' -.PHONY: full-test-acceptance-workingcopy -full-test-acceptance-workingcopy: ## Runs WorkingCopy Full Acceptance Testing in headless mode - $(NODEBIN)/start-test "make start-test-acceptance-server-workingcopy" http-get://127.0.0.1:55001/plone "make start-test-acceptance-frontend-workingcopy" http://127.0.0.1:3000 "make test-acceptance-workingcopy-headless" +.PHONY: working-copy-ci-acceptance-test-run-all +working-copy-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for working copy tests + $(NODEBIN)/start-test "make working-copy-acceptance-backend-start" http-get://127.0.0.1:55001/plone "make working-copy-acceptance-frontend-prod-start" http://127.0.0.1:3000 "make working-copy-ci-acceptance-test" ######### Guillotina Acceptance tests -.PHONY: start-test-acceptance-server-guillotina -start-test-acceptance-server-guillotina: ## Start Guillotina Test Acceptance Server (docker container) +.PHONY: guillotina-acceptance-backend-start +guillotina-acceptance-backend-start: ## Start backend acceptance server for Guillotina tests docker-compose -f g-api/docker-compose.yml up > /dev/null -.PHONY: start-test-acceptance-frontend-guillotina -start-test-acceptance-frontend-guillotina: ## Start the Guillotina Acceptance Frontend Fixture +.PHONY: guillotina-acceptance-frontend-prod-start +guillotina-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for Guillotina tests ADDONS=volto-guillotina RAZZLE_API_PATH=http://127.0.0.1:8081/db/web RAZZLE_LEGACY_TRAVERSE=true pnpm build && pnpm start:prod -.PHONY: test-acceptance-guillotina -test-acceptance-guillotina: ## Start the Guillotina Cypress Acceptance Tests +.PHONY: guillotina-acceptance-test +guillotina-acceptance-test: ## Start Cypress in interactive mode for Guillotina tests NODE_ENV=production CYPRESS_API=guillotina $(NODEBIN)/cypress open --config specPattern='cypress/tests/guillotina/**/*.{js,jsx,ts,tsx}' -.PHONY: test-acceptance-guillotina-headless -test-acceptance-guillotina-headless: ## Start the Guillotina Cypress Acceptance Tests in headless mode +.PHONY: guillotina-ci-acceptance-test +guillotina-ci-acceptance-test: ## Run Cypress tests in headless mode for CI for Guillotina tests NODE_ENV=production CYPRESS_API=guillotina $(NODEBIN)/cypress run --config specPattern='cypress/tests/guillotina/**/*.{js,jsx,ts,tsx}' -.PHONY: full-test-acceptance-guillotina -full-test-acceptance-guillotina: ## Runs the Guillotina Full Acceptance Testing in headless mode - $(NODEBIN)/start-test "make start-test-acceptance-server-guillotina" http-get://127.0.0.1:8081 "make start-test-acceptance-frontend-guillotina" http://127.0.0.1:3000 "make test-acceptance-guillotina-headless" +.PHONY: guillotina-ci-acceptance-test-run-all +guillotina-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for Guillotina tests + $(NODEBIN)/start-test "make guillotina-acceptance-backend-start" http-get://127.0.0.1:8081 "make guillotina-acceptance-frontend-prod-start" http://127.0.0.1:3000 "make guillotina-ci-acceptance-test" ######### Plone 5 Acceptance tests -.PHONY: start-test-acceptance-server-5 -start-test-acceptance-server-5: ## Start Test Acceptance Server Main Fixture Plone 5 (docker container) +.PHONY: plone5-acceptance-backend-start +plone5-acceptance-backend-start: ## Start backend acceptance server for Plone 5 tests docker run -i --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e ADDONS='$(KGS5) $(TESTING_ADDONS)' -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors $(DOCKER_IMAGE5) ./bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING diff --git a/packages/volto/news/6104.internal b/packages/volto/news/6104.internal new file mode 100644 index 0000000000..7b81417a6f --- /dev/null +++ b/packages/volto/news/6104.internal @@ -0,0 +1 @@ +Rename the `Makefile` commands to unify them with the new agreed naming scheme. @sneridagh