From f991b041080d9afbc0ad40dc17f5855e793d16b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Re=C3=A9?= Date: Thu, 29 Jun 2023 14:58:36 +0200 Subject: [PATCH] Fix CI - Use correct dockerfile - remove redundant ci.yml for now --- .github/workflows/acceptance.yml | 9 +++++-- acceptance/ci.yml | 36 -------------------------- acceptance/cypress/support/commands.js | 2 ++ acceptance/docker-compose.yml | 2 ++ 4 files changed, 11 insertions(+), 38 deletions(-) delete mode 100644 acceptance/ci.yml diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 0b85c71..27709c4 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -26,6 +26,8 @@ jobs: env: BABEL_ENV: production CYPRESS_RETRIES: 2 + CURRENT_DIR: '${{ github.workspace }}' + SOLR_CONTEXT_FOLDER: '${{ github.workspace }}/acceptance/solr' with: parallel: false browser: chrome @@ -33,8 +35,11 @@ jobs: spec: cypress/tests/*.js install: false start: | - docker compose -f ci.yml --profile prod up - wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000' + # XXX XXX This should be working with prod! + # docker compose -f docker-compose.yml --profile prod up + # XXX XXX This currently works with dev. + docker compose -f docker-compose.yml --profile dev up + wait-on: 'npx wait-on --httpTimeout 20000 http-get://localhost:55001/plone http://localhost:3000 http://localhost:8983' # Upload Cypress screenshots - uses: actions/upload-artifact@v3 diff --git a/acceptance/ci.yml b/acceptance/ci.yml deleted file mode 100644 index 9094c1e..0000000 --- a/acceptance/ci.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: "3" - -services: - - addon-acceptance: - build: - context: ../ - dockerfile: ./dockerfiles/Dockerfile - args: - ADDON_NAME: "${ADDON_NAME}" - ADDON_PATH: "${ADDON_PATH}" - VOLTO_VERSION: ${VOLTO_VERSION:-16} - environment: - RAZZLE_INTERNAL_API_PATH: http://backend-acceptance:55001/plone - RAZZLE_API_PATH: http://localhost:55001/plone - ports: - - 3000:3000 - depends_on: - - backend-acceptance - profiles: - - prod - - backend-acceptance: - image: plone/plone-backend:${PLONE_VERSION:-6} - command: ./bin/robot-server plone.app.robotframework.testing.VOLTO_ROBOT_TESTING - environment: - ZSERVER_HOST: 0.0.0.0 - ZSERVER_PORT: 55001 - ADDONS: 'plone.app.robotframework==2.0.0' - APPLY_PROFILES: plone.app.contenttypes:plone-content,plone.restapi:default,plone.volto:default-homepage - CONFIGURE_PACKAGES: plone.app.contenttypes,plone.restapi,plone.volto,plone.volto.cors - ports: - - 55001:55001 - profiles: - - dev - - prod diff --git a/acceptance/cypress/support/commands.js b/acceptance/cypress/support/commands.js index 3cae42d..7a59b22 100644 --- a/acceptance/cypress/support/commands.js +++ b/acceptance/cypress/support/commands.js @@ -1,5 +1,7 @@ import '@plone/volto-testing/cypress/support/commands'; +const PLONE_API_URL = `http://localhost:55001/plone`; + // --- AUTOLOGIN ------------------------------------------------------------- Cypress.Commands.add('autologin', (usr, pass) => { let api_url, user, password; diff --git a/acceptance/docker-compose.yml b/acceptance/docker-compose.yml index a544e34..567c54e 100644 --- a/acceptance/docker-compose.yml +++ b/acceptance/docker-compose.yml @@ -31,6 +31,8 @@ services: ADDON_NAME: '${ADDON_NAME}' ADDON_PATH: '${ADDON_PATH}' VOLTO_VERSION: ${VOLTO_VERSION:-16} + volumes: + - ${CURRENT_DIR}:/app/src/addons/${ADDON_PATH}/ environment: RAZZLE_INTERNAL_API_PATH: http://backend-acceptance:55001/plone RAZZLE_API_PATH: http://localhost:55001/plone