From c2109eb35030859089234095300b78bb2f2167d5 Mon Sep 17 00:00:00 2001 From: Baptiste Grimaud Date: Thu, 13 Nov 2025 11:32:26 +0100 Subject: [PATCH 1/6] ci: Use reusable workflow for integration tests --- .github/workflows/manual-run.yml | 66 ++------- .github/workflows/nightly.yml | 77 ++--------- .github/workflows/on-code-change.yml | 130 +++--------------- .github/workflows/on-merge.yml | 68 ++------- .gitignore | 5 +- .../tests => tests}/.dockerignore | 0 .../tests => tests}/.env.example | 0 .../.yarn/releases/yarn-4.10.3.cjs | 0 .../tests => tests}/.yarnrc.yml | 0 .../tests => tests}/assets/provisioning.yml | 0 .../tests => tests}/ci.build.sh | 0 .../tests => tests}/ci.startup.sh | 0 .../tests => tests}/cypress.config.ts | 1 + .../tests => tests}/cypress/README.md | 0 .../2-making-a-hero-section.cy.ts | 0 .../hydrogen-tutorial/3-about-us-page.cy.ts | 0 .../hydrogen-tutorial/4-making-a-blog.cy.ts | 0 .../5-view-content-in-full-page.cy.ts | 0 .../e2e/module/moduleRegistrationTest.cy.ts | 0 .../e2e/module/moduleSettingsTest.cy.ts | 0 .../e2e/module/moduleTransformationTest.cy.ts | 0 .../cypress/e2e/ui/absoluteAreaTest.cy.ts | 0 .../cypress/e2e/ui/addResources.cy.ts | 0 .../cypress/e2e/ui/areaTest.cy.ts | 0 .../cypress/e2e/ui/boundComponentTest.cy.ts | 0 .../cypress/e2e/ui/configTest.cy.ts | 0 .../cypress/e2e/ui/contentTemplate.cy.ts | 0 .../cypress/e2e/ui/currentContent.cy.ts | 0 .../cypress/e2e/ui/getChildNodesTest.cy.ts | 0 .../cypress/e2e/ui/getNodePropsTest.cy.ts | 0 .../e2e/ui/getNodesByJCRQueryTest.cy.ts | 0 .../cypress/e2e/ui/gqlTest.cy.ts | 0 .../cypress/e2e/ui/osgiTest.cy.ts | 0 .../e2e/ui/priorityOnTemplatesTest.cy.ts | 0 .../cypress/e2e/ui/priorityOnViewsTest.cy.ts | 0 .../cypress/e2e/ui/proxyPropsTest.cy.ts | 0 .../cypress/e2e/ui/reactClientSideTest.cy.ts | 0 .../e2e/ui/registerJahiaComponentsTest.cy.ts | 0 .../e2e/ui/renderShouldBeEditableTest.cy.ts | 0 .../cypress/e2e/ui/renderTest.cy.ts | 0 .../ui/templatePickerCorrectOrderTest.cy.ts | 0 .../cypress/e2e/ui/templateTest.cy.ts | 0 .../cypress/e2e/ui/testCurrentUser.cy.ts | 0 .../cypress/e2e/ui/testHasPermission.cy.ts | 0 .../cypress/e2e/ui/testI18n.cy.ts | 0 .../cypress/e2e/ui/testIsNodeType.cy.ts | 0 .../cypress/e2e/ui/testLocale.cy.ts | 0 .../cypress/e2e/ui/testUrlParameters.cy.ts | 0 .../cypress/e2e/ui/urlHelperTest.cy.ts | 0 .../cypress/e2e/ui/virtualNodeTest.cy.ts | 0 .../fixtures/graphql/jcrUploadFile.graphql | 0 .../fixtures/graphql/setProperties.graphql | 0 .../fixtures/groovy/getBundleHeaders.groovy | 0 .../cypress/fixtures/testData/image.jpg | Bin .../cypress/plugins/cy-ts-preprocessor.js | 0 .../tests => tests}/cypress/plugins/env.js | 0 .../tests => tests}/cypress/plugins/index.js | 0 .../cypress/plugins/unzipping.js | 0 .../cypress/support/commands.js | 0 .../cypress/support/constants.ts | 0 .../tests => tests}/cypress/support/e2e.js | 0 .../tests => tests}/cypress/tsconfig.json | 0 .../tests => tests}/cypress/utils/helpers.ts | 0 .../tests => tests}/docker-compose.yml | 0 .../tests => tests}/env.debug.sh | 0 .../tests => tests}/env.run.sh | 0 .../tests => tests}/package.json | 1 + .../provisioning-manifest-build.yml | 0 .../provisioning-manifest-snapshot.yml | 0 .../tests => tests}/reporter-config.json | 0 .../tests => tests}/reporter/base.js | 0 .../tests => tests}/reporter/json.js | 0 .../tests => tests}/reporter/utils.js | 0 .../tests => tests}/set-env.sh | 0 .../tests => tests}/tsconfig.json | 0 .../tests => tests}/yarn.lock | 0 76 files changed, 53 insertions(+), 295 deletions(-) rename {javascript-modules-engine/tests => tests}/.dockerignore (100%) rename {javascript-modules-engine/tests => tests}/.env.example (100%) rename {javascript-modules-engine/tests => tests}/.yarn/releases/yarn-4.10.3.cjs (100%) rename {javascript-modules-engine/tests => tests}/.yarnrc.yml (100%) rename {javascript-modules-engine/tests => tests}/assets/provisioning.yml (100%) rename {javascript-modules-engine/tests => tests}/ci.build.sh (100%) rename {javascript-modules-engine/tests => tests}/ci.startup.sh (100%) rename {javascript-modules-engine/tests => tests}/cypress.config.ts (98%) rename {javascript-modules-engine/tests => tests}/cypress/README.md (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/hydrogen-tutorial/2-making-a-hero-section.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/hydrogen-tutorial/3-about-us-page.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/hydrogen-tutorial/4-making-a-blog.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/hydrogen-tutorial/5-view-content-in-full-page.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/module/moduleRegistrationTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/module/moduleSettingsTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/module/moduleTransformationTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/absoluteAreaTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/addResources.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/areaTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/boundComponentTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/configTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/contentTemplate.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/currentContent.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/getChildNodesTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/getNodePropsTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/getNodesByJCRQueryTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/gqlTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/osgiTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/priorityOnTemplatesTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/priorityOnViewsTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/proxyPropsTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/reactClientSideTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/registerJahiaComponentsTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/renderShouldBeEditableTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/renderTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/templatePickerCorrectOrderTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/templateTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/testCurrentUser.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/testHasPermission.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/testI18n.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/testIsNodeType.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/testLocale.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/testUrlParameters.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/urlHelperTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/e2e/ui/virtualNodeTest.cy.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/fixtures/graphql/jcrUploadFile.graphql (100%) rename {javascript-modules-engine/tests => tests}/cypress/fixtures/graphql/setProperties.graphql (100%) rename {javascript-modules-engine/tests => tests}/cypress/fixtures/groovy/getBundleHeaders.groovy (100%) rename {javascript-modules-engine/tests => tests}/cypress/fixtures/testData/image.jpg (100%) rename {javascript-modules-engine/tests => tests}/cypress/plugins/cy-ts-preprocessor.js (100%) rename {javascript-modules-engine/tests => tests}/cypress/plugins/env.js (100%) rename {javascript-modules-engine/tests => tests}/cypress/plugins/index.js (100%) rename {javascript-modules-engine/tests => tests}/cypress/plugins/unzipping.js (100%) rename {javascript-modules-engine/tests => tests}/cypress/support/commands.js (100%) rename {javascript-modules-engine/tests => tests}/cypress/support/constants.ts (100%) rename {javascript-modules-engine/tests => tests}/cypress/support/e2e.js (100%) rename {javascript-modules-engine/tests => tests}/cypress/tsconfig.json (100%) rename {javascript-modules-engine/tests => tests}/cypress/utils/helpers.ts (100%) rename {javascript-modules-engine/tests => tests}/docker-compose.yml (100%) rename {javascript-modules-engine/tests => tests}/env.debug.sh (100%) rename {javascript-modules-engine/tests => tests}/env.run.sh (100%) rename {javascript-modules-engine/tests => tests}/package.json (95%) rename {javascript-modules-engine/tests => tests}/provisioning-manifest-build.yml (100%) rename {javascript-modules-engine/tests => tests}/provisioning-manifest-snapshot.yml (100%) rename {javascript-modules-engine/tests => tests}/reporter-config.json (100%) rename {javascript-modules-engine/tests => tests}/reporter/base.js (100%) rename {javascript-modules-engine/tests => tests}/reporter/json.js (100%) rename {javascript-modules-engine/tests => tests}/reporter/utils.js (100%) rename {javascript-modules-engine/tests => tests}/set-env.sh (100%) rename {javascript-modules-engine/tests => tests}/tsconfig.json (100%) rename {javascript-modules-engine/tests => tests}/yarn.lock (100%) diff --git a/.github/workflows/manual-run.yml b/.github/workflows/manual-run.yml index 34143c0e..8d4627e1 100644 --- a/.github/workflows/manual-run.yml +++ b/.github/workflows/manual-run.yml @@ -16,60 +16,12 @@ on: jobs: integration-tests: - name: Integration Tests - runs-on: self-hosted - steps: - - uses: jahia/jahia-modules-action/helper@v2 - - uses: actions/checkout@v4 - - uses: KengoTODA/actions-setup-docker-compose@main - with: - version: "1.29.2" - - uses: actions/setup-node@v4 - with: - node-version: "lts/*" - - uses: jahia/jahia-modules-action/integration-tests@v2 - with: - module_id: javascript-modules-engine - tests_path: "javascript-modules-engine/tests/" - testrail_project: Javascript Modules Engine - tests_manifest: ${{ github.event.inputs.manifest }} - jahia_image: ${{ github.event.inputs.jahia_image }} - jahia_license: ${{ secrets.JAHIA_LICENSE_8X_FULL }} - should_use_build_artifacts: false - github_artifact_name: js-eng-${{ github.run_number }} - bastion_ssh_private_key: ${{ secrets.BASTION_SSH_PRIVATE_KEY_JAHIACI }} - docker_registries: | - [ - { - "registry": "ghcr.io", - "username": "${{ secrets.GH_PACKAGES_USERNAME }}", - "password": "${{ secrets.GH_PACKAGES_TOKEN }}" - }, - { - "username": "${{ secrets.DOCKERHUB_USERNAME }}", - "password": "${{ secrets.DOCKERHUB_PASSWORD }}" - } - ] - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - testrail_username: ${{ secrets.TESTRAIL_USERNAME }} - testrail_password: ${{ secrets.TESTRAIL_PASSWORD }} - incident_pagerduty_api_key: ${{ secrets.INCIDENT_PAGERDUTY_API_KEY }} - incident_pagerduty_reporter_email: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_EMAIL }} - incident_pagerduty_reporter_id: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_ID }} - incident_google_spreadsheet_id: ${{ secrets.INCIDENT_GOOGLE_SPREADSHEET_ID }} - incident_google_client_email: ${{ secrets.INCIDENT_GOOGLE_CLIENT_EMAIL }} - incident_google_api_key_base64: ${{ secrets.INCIDENT_GOOGLE_PRIVATE_KEY_BASE64 }} - zencrepes_secret: ${{ secrets.ZENCREPES_WEBHOOK_SECRET }} - - name: Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() - with: - name: Tests Report (Standalone) - path: javascript-modules-engine/tests/artifacts/results/xml_reports/**/*.xml - reporter: java-junit - fail-on-error: "false" - env: - # During manual tests, the prepackaged site is fetched from a Maven repository. - # For test executions using built artifacts, a local prepackaged archive is used (moved to the ./artifacts/ folder during the build). - CYPRESS_PREPACKAGED_SITE_URL: "jar:mvn:org.jahia.samples/javascript-modules-samples-hydrogen-prepackaged/LATEST/zip!/site.zip" + uses: Jahia/jahia-modules-action/.github/workflows/reusable-integration-tests.yml@v2 + secrets: inherit + with: + jahia_image: ${{ github.event.inputs.jahia_image }} + module_id: javascript-modules-engine + testrail_project: Javascript Modules Engine + pagerduty_skip_notification: true + provisioning_manifest: ${{ github.event.inputs.manifest }} + artifact_prefix: js-eng diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 45b11493..9ebabe5b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -7,68 +7,21 @@ on: jobs: integration-tests-standalone: - name: Integration Tests (Standalone) - runs-on: self-hosted + uses: Jahia/jahia-modules-action/.github/workflows/reusable-integration-tests.yml@v2 + secrets: inherit strategy: fail-fast: false matrix: - # For the time being testing on the release has been desactived since there is no release yet - # jahia_image: ["jahia/jahia-ee-dev:8", "ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT"] - jahia_image: ["ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT"] - timeout-minutes: 45 - steps: - - uses: jahia/jahia-modules-action/helper@v2 - - uses: KengoTODA/actions-setup-docker-compose@main - with: - version: "1.29.2" - - uses: actions/setup-node@v4 - with: - node-version: "lts/*" - - uses: actions/checkout@v4 - - uses: jahia/jahia-modules-action/integration-tests@v2 - with: - module_id: javascript-modules-engine - tests_path: "javascript-modules-engine/tests/" - testrail_project: Javascript Modules Engine - tests_manifest: provisioning-manifest-snapshot.yml - jahia_image: ${{ matrix.jahia_image }} - jahia_license: ${{ secrets.JAHIA_LICENSE_8X_FULL }} - should_use_build_artifacts: false - should_skip_testrail: false - github_artifact_name: js-eng-${{ strategy.job-index }}-${{ github.run_number }} - bastion_ssh_private_key: ${{ secrets.BASTION_SSH_PRIVATE_KEY_JAHIACI }} - docker_registries: | - [ - { - "registry": "ghcr.io", - "username": "${{ secrets.GH_PACKAGES_USERNAME }}", - "password": "${{ secrets.GH_PACKAGES_TOKEN }}" - }, - { - "username": "${{ secrets.DOCKERHUB_USERNAME }}", - "password": "${{ secrets.DOCKERHUB_PASSWORD }}" - } - ] - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - testrail_username: ${{ secrets.TESTRAIL_USERNAME }} - testrail_password: ${{ secrets.TESTRAIL_PASSWORD }} - incident_pagerduty_api_key: ${{ secrets.INCIDENT_PAGERDUTY_API_KEY }} - incident_pagerduty_reporter_email: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_EMAIL }} - incident_pagerduty_reporter_id: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_ID }} - incident_google_spreadsheet_id: ${{ secrets.INCIDENT_GOOGLE_SPREADSHEET_ID }} - incident_google_client_email: ${{ secrets.INCIDENT_GOOGLE_CLIENT_EMAIL }} - incident_google_api_key_base64: ${{ secrets.INCIDENT_GOOGLE_PRIVATE_KEY_BASE64 }} - zencrepes_secret: ${{ secrets.ZENCREPES_WEBHOOK_SECRET }} - - name: Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() - with: - name: Tests Report (Standalone) - path: javascript-modules-engine/tests/artifacts/results/xml_reports/**/*.xml - reporter: java-junit - fail-on-error: "false" - env: - # During nightly tests, the prepackaged site is fetched from a Maven repository. - # For test executions using built artifacts, a local prepackaged archive is used (moved to the ./artifacts/ folder during the build). - CYPRESS_PREPACKAGED_SITE_URL: "jar:mvn:org.jahia.samples/javascript-modules-samples-hydrogen-prepackaged/LATEST/zip!/site.zip" + include: + - jahia_image: jahia/jahia-ee:8 + incident_service_suffix: RL + - jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT + incident_service_suffix: SN + with: + jahia_image: ${matrix.jahia_image} + module_id: javascript-modules-engine + testrail_project: Javascript Modules Engine + pagerduty_incident_service: javascript-modules-engine-{{ matrix.incident_service_suffix }} + provisioning_manifest: provisioning-manifest-snapshot.yml + artifact_prefix: js-eng + module_branch: ${{ github.ref }} diff --git a/.github/workflows/on-code-change.yml b/.github/workflows/on-code-change.yml index 7a0a6c1a..a2959111 100644 --- a/.github/workflows/on-code-change.yml +++ b/.github/workflows/on-code-change.yml @@ -13,120 +13,22 @@ on: - "docs/**" jobs: - static-analysis: - name: Static Analysis (linting, vulns) - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: jahia/jahia-modules-action/static-analysis@v2 - with: - node_version: 20 - yarn_version: 4.7.0 - yarn_test_version: 4.7.0 - auditci_level: critical - - build: - name: Build Module - runs-on: self-hosted - env: - NEXUS_INTERNAL_URL: ${{ secrets.NEXUS_INTERNAL_URL }} - container: - image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded - credentials: - username: ${{ secrets.GH_PACKAGES_USERNAME }} - password: ${{ secrets.GH_PACKAGES_TOKEN }} - steps: - - uses: actions/checkout@v4 - - uses: jahia/jahia-modules-action/build@v2 - with: - # the test module is built as part of the Maven build - tests_module_type: "disabled" - mvn_settings_filepath: ".github/maven.settings.xml" - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - - sonar-analysis: - name: Sonar Analysis - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: jahia/jahia-modules-action/sonar-analysis@v2 - with: - primary_release_branch: main - github_pr_id: ${{github.event.number}} - sonar_url: ${{ secrets.SONAR_URL }} - sonar_token: ${{ secrets.SONAR_TOKEN }} - mvn_settings_filepath: ".github/maven.settings.xml" - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - - integration-tests-standalone: - name: Integration Tests (Standalone) - needs: build - runs-on: self-hosted - strategy: - fail-fast: false - timeout-minutes: 45 - steps: - - uses: jahia/jahia-modules-action/helper@v2 - - uses: KengoTODA/actions-setup-docker-compose@main - with: - version: "1.29.2" - - uses: actions/setup-node@v4 - with: - node-version: "lts/*" - # Enable corepack, the Node-provided package manager manager - - run: corepack enable - - uses: actions/checkout@v4 - - uses: jahia/jahia-modules-action/integration-tests@v2 - with: - module_id: javascript-modules-engine - tests_path: "javascript-modules-engine/tests/" - testrail_project: Javascript Modules Engine - tests_manifest: provisioning-manifest-build.yml - jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT - jahia_license: ${{ secrets.JAHIA_LICENSE_8X_FULL }} - should_use_build_artifacts: true - github_artifact_name: js-eng-${{ github.run_number }} - bastion_ssh_private_key: ${{ secrets.BASTION_SSH_PRIVATE_KEY_JAHIACI }} - docker_registries: | - [ - { - "registry": "ghcr.io", - "username": "${{ secrets.GH_PACKAGES_USERNAME }}", - "password": "${{ secrets.GH_PACKAGES_TOKEN }}" - }, - { - "username": "${{ secrets.DOCKERHUB_USERNAME }}", - "password": "${{ secrets.DOCKERHUB_PASSWORD }}" - } - ] - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - tests_report_name: Test report (Standalone) - testrail_username: ${{ secrets.TESTRAIL_USERNAME }} - testrail_password: ${{ secrets.TESTRAIL_PASSWORD }} - incident_pagerduty_api_key: ${{ secrets.INCIDENT_PAGERDUTY_API_KEY }} - incident_pagerduty_reporter_email: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_EMAIL }} - incident_pagerduty_reporter_id: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_ID }} - incident_google_spreadsheet_id: ${{ secrets.INCIDENT_GOOGLE_SPREADSHEET_ID }} - incident_google_client_email: ${{ secrets.INCIDENT_GOOGLE_CLIENT_EMAIL }} - incident_google_api_key_base64: ${{ secrets.INCIDENT_GOOGLE_PRIVATE_KEY_BASE64 }} - zencrepes_secret: ${{ secrets.ZENCREPES_WEBHOOK_SECRET }} - env: - YARN_VERSION: 4.7.0 - # glob filename, related to the ./artifacts/ folder, to use to fetch the prepackaged site. This jar is generated by the 'build' step. - # for nightly/manual tests, the prepackaged site is fetched from a Maven repository. - CYPRESS_PREPACKAGED_SITE_URL: "javascript-modules-samples-hydrogen-prepackaged-*.jar" - - name: Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() - with: - name: Tests Report (Standalone) - path: javascript-modules-engine/tests/artifacts/results/xml_reports/**/*.xml - reporter: java-junit - fail-on-error: "false" + on-code-change: + uses: Jahia/jahia-modules-action/.github/workflows/reusable-on-code-change.yml@v2 + secrets: inherit + with: + static_analysis_node_version: 20 + static_analysis_auditci_level: critical + build_container_image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded + module_branch: ${{ github.ref }} + sonar_analysis_primary_release_branch: main + integration_tests_standalone_execute: true + module_id: javascript-modules-engine + integration_tests_testrail_project: Javascript Modules Engine + integration_tests_jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT + integration_tests_provisioning_manifest: provisioning-manifest-build.yml + integration_tests_should_use_build_artifacts: true + integration_tests_should_skip_testrail: true # This workflow ensures that Windows builds are exactly the same as on other platforms test-on-windows: diff --git a/.github/workflows/on-merge.yml b/.github/workflows/on-merge.yml index 2c5fa10e..d20a0730 100644 --- a/.github/workflows/on-merge.yml +++ b/.github/workflows/on-merge.yml @@ -62,67 +62,15 @@ jobs: sbom_artifacts: "build-artifacts" integration-tests-standalone: - name: Integration Tests (Standalone) + uses: Jahia/jahia-modules-action/.github/workflows/reusable-integration-tests.yml@v2 needs: build - runs-on: self-hosted - timeout-minutes: 45 - steps: - - uses: jahia/jahia-modules-action/helper@v2 - - uses: KengoTODA/actions-setup-docker-compose@main - with: - version: "1.29.2" - - uses: actions/setup-node@v4 - with: - node-version: "lts/*" - - uses: actions/checkout@v4 - - uses: jahia/jahia-modules-action/integration-tests@v2 - with: - module_id: javascript-modules-engine - tests_path: "javascript-modules-engine/tests/" - testrail_project: Javascript Modules Engine - tests_manifest: provisioning-manifest-build.yml - jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT - jahia_license: ${{ secrets.JAHIA_LICENSE_8X_FULL }} - should_use_build_artifacts: true - should_skip_testrail: false - github_artifact_name: js-eng-${{ github.run_number }} - bastion_ssh_private_key: ${{ secrets.BASTION_SSH_PRIVATE_KEY_JAHIACI }} - docker_registries: | - [ - { - "registry": "ghcr.io", - "username": "${{ secrets.GH_PACKAGES_USERNAME }}", - "password": "${{ secrets.GH_PACKAGES_TOKEN }}" - }, - { - "username": "${{ secrets.DOCKERHUB_USERNAME }}", - "password": "${{ secrets.DOCKERHUB_PASSWORD }}" - } - ] - nexus_username: ${{ secrets.NEXUS_USERNAME }} - nexus_password: ${{ secrets.NEXUS_PASSWORD }} - tests_report_name: Test report (Standalone) - testrail_username: ${{ secrets.TESTRAIL_USERNAME }} - testrail_password: ${{ secrets.TESTRAIL_PASSWORD }} - incident_pagerduty_api_key: ${{ secrets.INCIDENT_PAGERDUTY_API_KEY }} - incident_pagerduty_reporter_email: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_EMAIL }} - incident_pagerduty_reporter_id: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_ID }} - incident_google_spreadsheet_id: ${{ secrets.INCIDENT_GOOGLE_SPREADSHEET_ID }} - incident_google_client_email: ${{ secrets.INCIDENT_GOOGLE_CLIENT_EMAIL }} - incident_google_api_key_base64: ${{ secrets.INCIDENT_GOOGLE_PRIVATE_KEY_BASE64 }} - zencrepes_secret: ${{ secrets.ZENCREPES_WEBHOOK_SECRET }} - - name: Test Report - uses: dorny/test-reporter@v1 - if: success() || failure() - with: - name: Tests Report (Standalone) - path: javascript-modules-engine/tests/artifacts/results/xml_reports/**/*.xml - reporter: java-junit - fail-on-error: "false" - env: - # glob filename, related to the ./artifacts/ folder, to use to fetch the prepackaged site. This jar is generated by the 'build' step. - # for nightly/manual tests, the prepackaged site is fetched from a Maven repository. - CYPRESS_PREPACKAGED_SITE_URL: "javascript-modules-samples-hydrogen-prepackaged-*.jar" + secrets: inherit + with: + jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT + module_id: javascript-modules-engine + testrail_project: Javascript Modules Engine + provisioning_manifest: provisioning-manifest-build.yml + artifact_prefix: js-eng publish: name: Publish module diff --git a/.gitignore b/.gitignore index 797f03b4..7e177a01 100644 --- a/.gitignore +++ b/.gitignore @@ -16,5 +16,6 @@ node_modules/ **/.yarn/cache/ javascript-modules-engine/src/main/resources/javascript/ javascript-modules-engine/src/main/resources/META-INF/js/ -javascript-modules-engine/tests/artifacts/ -javascript-modules-engine/tests/results/ +tests/artifacts/ +tests/run-artifacts/ +tests/results/ diff --git a/javascript-modules-engine/tests/.dockerignore b/tests/.dockerignore similarity index 100% rename from javascript-modules-engine/tests/.dockerignore rename to tests/.dockerignore diff --git a/javascript-modules-engine/tests/.env.example b/tests/.env.example similarity index 100% rename from javascript-modules-engine/tests/.env.example rename to tests/.env.example diff --git a/javascript-modules-engine/tests/.yarn/releases/yarn-4.10.3.cjs b/tests/.yarn/releases/yarn-4.10.3.cjs similarity index 100% rename from javascript-modules-engine/tests/.yarn/releases/yarn-4.10.3.cjs rename to tests/.yarn/releases/yarn-4.10.3.cjs diff --git a/javascript-modules-engine/tests/.yarnrc.yml b/tests/.yarnrc.yml similarity index 100% rename from javascript-modules-engine/tests/.yarnrc.yml rename to tests/.yarnrc.yml diff --git a/javascript-modules-engine/tests/assets/provisioning.yml b/tests/assets/provisioning.yml similarity index 100% rename from javascript-modules-engine/tests/assets/provisioning.yml rename to tests/assets/provisioning.yml diff --git a/javascript-modules-engine/tests/ci.build.sh b/tests/ci.build.sh similarity index 100% rename from javascript-modules-engine/tests/ci.build.sh rename to tests/ci.build.sh diff --git a/javascript-modules-engine/tests/ci.startup.sh b/tests/ci.startup.sh similarity index 100% rename from javascript-modules-engine/tests/ci.startup.sh rename to tests/ci.startup.sh diff --git a/javascript-modules-engine/tests/cypress.config.ts b/tests/cypress.config.ts similarity index 98% rename from javascript-modules-engine/tests/cypress.config.ts rename to tests/cypress.config.ts index df8b74dd..9fe7506a 100644 --- a/javascript-modules-engine/tests/cypress.config.ts +++ b/tests/cypress.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ JAHIA_PASSWORD: "root1234", }, screenshotsFolder: "./results/screenshots", + video: true, videosFolder: "./results/videos", viewportWidth: 1366, viewportHeight: 768, diff --git a/javascript-modules-engine/tests/cypress/README.md b/tests/cypress/README.md similarity index 100% rename from javascript-modules-engine/tests/cypress/README.md rename to tests/cypress/README.md diff --git a/javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/2-making-a-hero-section.cy.ts b/tests/cypress/e2e/hydrogen-tutorial/2-making-a-hero-section.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/2-making-a-hero-section.cy.ts rename to tests/cypress/e2e/hydrogen-tutorial/2-making-a-hero-section.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/3-about-us-page.cy.ts b/tests/cypress/e2e/hydrogen-tutorial/3-about-us-page.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/3-about-us-page.cy.ts rename to tests/cypress/e2e/hydrogen-tutorial/3-about-us-page.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/4-making-a-blog.cy.ts b/tests/cypress/e2e/hydrogen-tutorial/4-making-a-blog.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/4-making-a-blog.cy.ts rename to tests/cypress/e2e/hydrogen-tutorial/4-making-a-blog.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/5-view-content-in-full-page.cy.ts b/tests/cypress/e2e/hydrogen-tutorial/5-view-content-in-full-page.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/hydrogen-tutorial/5-view-content-in-full-page.cy.ts rename to tests/cypress/e2e/hydrogen-tutorial/5-view-content-in-full-page.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/module/moduleRegistrationTest.cy.ts b/tests/cypress/e2e/module/moduleRegistrationTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/module/moduleRegistrationTest.cy.ts rename to tests/cypress/e2e/module/moduleRegistrationTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/module/moduleSettingsTest.cy.ts b/tests/cypress/e2e/module/moduleSettingsTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/module/moduleSettingsTest.cy.ts rename to tests/cypress/e2e/module/moduleSettingsTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/module/moduleTransformationTest.cy.ts b/tests/cypress/e2e/module/moduleTransformationTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/module/moduleTransformationTest.cy.ts rename to tests/cypress/e2e/module/moduleTransformationTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/absoluteAreaTest.cy.ts b/tests/cypress/e2e/ui/absoluteAreaTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/absoluteAreaTest.cy.ts rename to tests/cypress/e2e/ui/absoluteAreaTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/addResources.cy.ts b/tests/cypress/e2e/ui/addResources.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/addResources.cy.ts rename to tests/cypress/e2e/ui/addResources.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/areaTest.cy.ts b/tests/cypress/e2e/ui/areaTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/areaTest.cy.ts rename to tests/cypress/e2e/ui/areaTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/boundComponentTest.cy.ts b/tests/cypress/e2e/ui/boundComponentTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/boundComponentTest.cy.ts rename to tests/cypress/e2e/ui/boundComponentTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/configTest.cy.ts b/tests/cypress/e2e/ui/configTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/configTest.cy.ts rename to tests/cypress/e2e/ui/configTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/contentTemplate.cy.ts b/tests/cypress/e2e/ui/contentTemplate.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/contentTemplate.cy.ts rename to tests/cypress/e2e/ui/contentTemplate.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/currentContent.cy.ts b/tests/cypress/e2e/ui/currentContent.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/currentContent.cy.ts rename to tests/cypress/e2e/ui/currentContent.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/getChildNodesTest.cy.ts b/tests/cypress/e2e/ui/getChildNodesTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/getChildNodesTest.cy.ts rename to tests/cypress/e2e/ui/getChildNodesTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/getNodePropsTest.cy.ts b/tests/cypress/e2e/ui/getNodePropsTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/getNodePropsTest.cy.ts rename to tests/cypress/e2e/ui/getNodePropsTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/getNodesByJCRQueryTest.cy.ts b/tests/cypress/e2e/ui/getNodesByJCRQueryTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/getNodesByJCRQueryTest.cy.ts rename to tests/cypress/e2e/ui/getNodesByJCRQueryTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/gqlTest.cy.ts b/tests/cypress/e2e/ui/gqlTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/gqlTest.cy.ts rename to tests/cypress/e2e/ui/gqlTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/osgiTest.cy.ts b/tests/cypress/e2e/ui/osgiTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/osgiTest.cy.ts rename to tests/cypress/e2e/ui/osgiTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/priorityOnTemplatesTest.cy.ts b/tests/cypress/e2e/ui/priorityOnTemplatesTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/priorityOnTemplatesTest.cy.ts rename to tests/cypress/e2e/ui/priorityOnTemplatesTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/priorityOnViewsTest.cy.ts b/tests/cypress/e2e/ui/priorityOnViewsTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/priorityOnViewsTest.cy.ts rename to tests/cypress/e2e/ui/priorityOnViewsTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/proxyPropsTest.cy.ts b/tests/cypress/e2e/ui/proxyPropsTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/proxyPropsTest.cy.ts rename to tests/cypress/e2e/ui/proxyPropsTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/reactClientSideTest.cy.ts b/tests/cypress/e2e/ui/reactClientSideTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/reactClientSideTest.cy.ts rename to tests/cypress/e2e/ui/reactClientSideTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/registerJahiaComponentsTest.cy.ts b/tests/cypress/e2e/ui/registerJahiaComponentsTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/registerJahiaComponentsTest.cy.ts rename to tests/cypress/e2e/ui/registerJahiaComponentsTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/renderShouldBeEditableTest.cy.ts b/tests/cypress/e2e/ui/renderShouldBeEditableTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/renderShouldBeEditableTest.cy.ts rename to tests/cypress/e2e/ui/renderShouldBeEditableTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/renderTest.cy.ts b/tests/cypress/e2e/ui/renderTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/renderTest.cy.ts rename to tests/cypress/e2e/ui/renderTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/templatePickerCorrectOrderTest.cy.ts b/tests/cypress/e2e/ui/templatePickerCorrectOrderTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/templatePickerCorrectOrderTest.cy.ts rename to tests/cypress/e2e/ui/templatePickerCorrectOrderTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/templateTest.cy.ts b/tests/cypress/e2e/ui/templateTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/templateTest.cy.ts rename to tests/cypress/e2e/ui/templateTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/testCurrentUser.cy.ts b/tests/cypress/e2e/ui/testCurrentUser.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/testCurrentUser.cy.ts rename to tests/cypress/e2e/ui/testCurrentUser.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/testHasPermission.cy.ts b/tests/cypress/e2e/ui/testHasPermission.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/testHasPermission.cy.ts rename to tests/cypress/e2e/ui/testHasPermission.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/testI18n.cy.ts b/tests/cypress/e2e/ui/testI18n.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/testI18n.cy.ts rename to tests/cypress/e2e/ui/testI18n.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/testIsNodeType.cy.ts b/tests/cypress/e2e/ui/testIsNodeType.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/testIsNodeType.cy.ts rename to tests/cypress/e2e/ui/testIsNodeType.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/testLocale.cy.ts b/tests/cypress/e2e/ui/testLocale.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/testLocale.cy.ts rename to tests/cypress/e2e/ui/testLocale.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/testUrlParameters.cy.ts b/tests/cypress/e2e/ui/testUrlParameters.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/testUrlParameters.cy.ts rename to tests/cypress/e2e/ui/testUrlParameters.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/urlHelperTest.cy.ts b/tests/cypress/e2e/ui/urlHelperTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/urlHelperTest.cy.ts rename to tests/cypress/e2e/ui/urlHelperTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/e2e/ui/virtualNodeTest.cy.ts b/tests/cypress/e2e/ui/virtualNodeTest.cy.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/e2e/ui/virtualNodeTest.cy.ts rename to tests/cypress/e2e/ui/virtualNodeTest.cy.ts diff --git a/javascript-modules-engine/tests/cypress/fixtures/graphql/jcrUploadFile.graphql b/tests/cypress/fixtures/graphql/jcrUploadFile.graphql similarity index 100% rename from javascript-modules-engine/tests/cypress/fixtures/graphql/jcrUploadFile.graphql rename to tests/cypress/fixtures/graphql/jcrUploadFile.graphql diff --git a/javascript-modules-engine/tests/cypress/fixtures/graphql/setProperties.graphql b/tests/cypress/fixtures/graphql/setProperties.graphql similarity index 100% rename from javascript-modules-engine/tests/cypress/fixtures/graphql/setProperties.graphql rename to tests/cypress/fixtures/graphql/setProperties.graphql diff --git a/javascript-modules-engine/tests/cypress/fixtures/groovy/getBundleHeaders.groovy b/tests/cypress/fixtures/groovy/getBundleHeaders.groovy similarity index 100% rename from javascript-modules-engine/tests/cypress/fixtures/groovy/getBundleHeaders.groovy rename to tests/cypress/fixtures/groovy/getBundleHeaders.groovy diff --git a/javascript-modules-engine/tests/cypress/fixtures/testData/image.jpg b/tests/cypress/fixtures/testData/image.jpg similarity index 100% rename from javascript-modules-engine/tests/cypress/fixtures/testData/image.jpg rename to tests/cypress/fixtures/testData/image.jpg diff --git a/javascript-modules-engine/tests/cypress/plugins/cy-ts-preprocessor.js b/tests/cypress/plugins/cy-ts-preprocessor.js similarity index 100% rename from javascript-modules-engine/tests/cypress/plugins/cy-ts-preprocessor.js rename to tests/cypress/plugins/cy-ts-preprocessor.js diff --git a/javascript-modules-engine/tests/cypress/plugins/env.js b/tests/cypress/plugins/env.js similarity index 100% rename from javascript-modules-engine/tests/cypress/plugins/env.js rename to tests/cypress/plugins/env.js diff --git a/javascript-modules-engine/tests/cypress/plugins/index.js b/tests/cypress/plugins/index.js similarity index 100% rename from javascript-modules-engine/tests/cypress/plugins/index.js rename to tests/cypress/plugins/index.js diff --git a/javascript-modules-engine/tests/cypress/plugins/unzipping.js b/tests/cypress/plugins/unzipping.js similarity index 100% rename from javascript-modules-engine/tests/cypress/plugins/unzipping.js rename to tests/cypress/plugins/unzipping.js diff --git a/javascript-modules-engine/tests/cypress/support/commands.js b/tests/cypress/support/commands.js similarity index 100% rename from javascript-modules-engine/tests/cypress/support/commands.js rename to tests/cypress/support/commands.js diff --git a/javascript-modules-engine/tests/cypress/support/constants.ts b/tests/cypress/support/constants.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/support/constants.ts rename to tests/cypress/support/constants.ts diff --git a/javascript-modules-engine/tests/cypress/support/e2e.js b/tests/cypress/support/e2e.js similarity index 100% rename from javascript-modules-engine/tests/cypress/support/e2e.js rename to tests/cypress/support/e2e.js diff --git a/javascript-modules-engine/tests/cypress/tsconfig.json b/tests/cypress/tsconfig.json similarity index 100% rename from javascript-modules-engine/tests/cypress/tsconfig.json rename to tests/cypress/tsconfig.json diff --git a/javascript-modules-engine/tests/cypress/utils/helpers.ts b/tests/cypress/utils/helpers.ts similarity index 100% rename from javascript-modules-engine/tests/cypress/utils/helpers.ts rename to tests/cypress/utils/helpers.ts diff --git a/javascript-modules-engine/tests/docker-compose.yml b/tests/docker-compose.yml similarity index 100% rename from javascript-modules-engine/tests/docker-compose.yml rename to tests/docker-compose.yml diff --git a/javascript-modules-engine/tests/env.debug.sh b/tests/env.debug.sh similarity index 100% rename from javascript-modules-engine/tests/env.debug.sh rename to tests/env.debug.sh diff --git a/javascript-modules-engine/tests/env.run.sh b/tests/env.run.sh similarity index 100% rename from javascript-modules-engine/tests/env.run.sh rename to tests/env.run.sh diff --git a/javascript-modules-engine/tests/package.json b/tests/package.json similarity index 95% rename from javascript-modules-engine/tests/package.json rename to tests/package.json index fd32e2f4..05a07566 100644 --- a/javascript-modules-engine/tests/package.json +++ b/tests/package.json @@ -12,6 +12,7 @@ "e2e:ci": "cypress run --browser chrome", "e2e:debug": "cypress open", "instrument": "nyc instrument --compact=false cypress instrumented", + "lint": "echo 'linting is available at the monorepo root'", "publish-tests": "yarn version --prerelease --preid=tests && git push --follow-tags && npm publish --access public", "report:html": "marge --inline results/reports/report.json --reportDir results/reports/", "report:merge": "mochawesome-merge results/reports/mochawesome*.json > results/reports/report.json && rm results/reports/mochawesome*.json" diff --git a/javascript-modules-engine/tests/provisioning-manifest-build.yml b/tests/provisioning-manifest-build.yml similarity index 100% rename from javascript-modules-engine/tests/provisioning-manifest-build.yml rename to tests/provisioning-manifest-build.yml diff --git a/javascript-modules-engine/tests/provisioning-manifest-snapshot.yml b/tests/provisioning-manifest-snapshot.yml similarity index 100% rename from javascript-modules-engine/tests/provisioning-manifest-snapshot.yml rename to tests/provisioning-manifest-snapshot.yml diff --git a/javascript-modules-engine/tests/reporter-config.json b/tests/reporter-config.json similarity index 100% rename from javascript-modules-engine/tests/reporter-config.json rename to tests/reporter-config.json diff --git a/javascript-modules-engine/tests/reporter/base.js b/tests/reporter/base.js similarity index 100% rename from javascript-modules-engine/tests/reporter/base.js rename to tests/reporter/base.js diff --git a/javascript-modules-engine/tests/reporter/json.js b/tests/reporter/json.js similarity index 100% rename from javascript-modules-engine/tests/reporter/json.js rename to tests/reporter/json.js diff --git a/javascript-modules-engine/tests/reporter/utils.js b/tests/reporter/utils.js similarity index 100% rename from javascript-modules-engine/tests/reporter/utils.js rename to tests/reporter/utils.js diff --git a/javascript-modules-engine/tests/set-env.sh b/tests/set-env.sh similarity index 100% rename from javascript-modules-engine/tests/set-env.sh rename to tests/set-env.sh diff --git a/javascript-modules-engine/tests/tsconfig.json b/tests/tsconfig.json similarity index 100% rename from javascript-modules-engine/tests/tsconfig.json rename to tests/tsconfig.json diff --git a/javascript-modules-engine/tests/yarn.lock b/tests/yarn.lock similarity index 100% rename from javascript-modules-engine/tests/yarn.lock rename to tests/yarn.lock From dea2a6b35c41fcc7d2aa5c880b0c64a926ef73f5 Mon Sep 17 00:00:00 2001 From: Baptiste Grimaud Date: Fri, 14 Nov 2025 13:35:44 +0100 Subject: [PATCH 2/6] fix variable syntax --- .github/workflows/nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9ebabe5b..4e15305f 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,10 +18,10 @@ jobs: - jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT incident_service_suffix: SN with: - jahia_image: ${matrix.jahia_image} + jahia_image: ${{ matrix.jahia_image }} module_id: javascript-modules-engine testrail_project: Javascript Modules Engine - pagerduty_incident_service: javascript-modules-engine-{{ matrix.incident_service_suffix }} + pagerduty_incident_service: javascript-modules-engine-${{ matrix.incident_service_suffix }} provisioning_manifest: provisioning-manifest-snapshot.yml artifact_prefix: js-eng module_branch: ${{ github.ref }} From 162b1c107c51b023d3f15751f4a7e6c6d3930a16 Mon Sep 17 00:00:00 2001 From: Baptiste Grimaud Date: Fri, 14 Nov 2025 13:53:43 +0100 Subject: [PATCH 3/6] set default branch to main for manual run --- .github/workflows/manual-run.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/manual-run.yml b/.github/workflows/manual-run.yml index 8d4627e1..1d915efc 100644 --- a/.github/workflows/manual-run.yml +++ b/.github/workflows/manual-run.yml @@ -22,6 +22,7 @@ jobs: jahia_image: ${{ github.event.inputs.jahia_image }} module_id: javascript-modules-engine testrail_project: Javascript Modules Engine + module_branch: 'main' pagerduty_skip_notification: true provisioning_manifest: ${{ github.event.inputs.manifest }} artifact_prefix: js-eng From ad85de1968b3f4a7f8c18fd2b4a8bd89d94182f0 Mon Sep 17 00:00:00 2001 From: Baptiste Grimaud Date: Fri, 14 Nov 2025 13:55:12 +0100 Subject: [PATCH 4/6] remove video --- tests/cypress.config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/cypress.config.ts b/tests/cypress.config.ts index 9fe7506a..df8b74dd 100644 --- a/tests/cypress.config.ts +++ b/tests/cypress.config.ts @@ -13,7 +13,6 @@ export default defineConfig({ JAHIA_PASSWORD: "root1234", }, screenshotsFolder: "./results/screenshots", - video: true, videosFolder: "./results/videos", viewportWidth: 1366, viewportHeight: 768, From 57528273b11df225c513b1a57666b372cfdd3ae5 Mon Sep 17 00:00:00 2001 From: Baptiste Grimaud Date: Sun, 16 Nov 2025 08:20:16 +0100 Subject: [PATCH 5/6] for now, remove tests execution against Jahia RL --- .github/workflows/nightly.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4e15305f..b6e87800 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -13,15 +13,13 @@ jobs: fail-fast: false matrix: include: - - jahia_image: jahia/jahia-ee:8 - incident_service_suffix: RL - jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT - incident_service_suffix: SN + suffix: SN with: jahia_image: ${{ matrix.jahia_image }} module_id: javascript-modules-engine testrail_project: Javascript Modules Engine - pagerduty_incident_service: javascript-modules-engine-${{ matrix.incident_service_suffix }} + pagerduty_incident_service: javascript-modules-engine-${{ matrix.suffix }} provisioning_manifest: provisioning-manifest-snapshot.yml - artifact_prefix: js-eng + artifact_prefix: tests-${{ matrix.suffix }} module_branch: ${{ github.ref }} From 2a798778b6f590a3b8f0f73f86ec42c1752468ce Mon Sep 17 00:00:00 2001 From: Baptiste Grimaud Date: Sun, 16 Nov 2025 08:31:51 +0100 Subject: [PATCH 6/6] use git ref as branch for manual run --- .github/workflows/manual-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-run.yml b/.github/workflows/manual-run.yml index 1d915efc..32e30012 100644 --- a/.github/workflows/manual-run.yml +++ b/.github/workflows/manual-run.yml @@ -22,7 +22,7 @@ jobs: jahia_image: ${{ github.event.inputs.jahia_image }} module_id: javascript-modules-engine testrail_project: Javascript Modules Engine - module_branch: 'main' + module_branch: ${{ github.ref }} pagerduty_skip_notification: true provisioning_manifest: ${{ github.event.inputs.manifest }} artifact_prefix: js-eng