Repository navigation
ci: run cypress on bare-metal #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Experiment: run the Cypress suite on a GitHub-hosted runner, directly on the host, without building a test image | |
| name: E2E on bare metal | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| paths: | |
| - ".github/workflows/e2e-bare-metal.yml" | |
| - "tests/ci.build.bare-metal.sh" | |
| - "tests/ci.startup.bare-metal.sh" | |
| permissions: | |
| actions: read | |
| checks: write | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| name: Build Module | |
| runs-on: ubuntu-latest | |
| 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: jahia/jahia-modules-action/build@v2 | |
| with: | |
| mvn_settings_filepath: ".github/maven.settings.xml" | |
| nexus_username: ${{ secrets.NEXUS_USERNAME }} | |
| nexus_password: ${{ secrets.NEXUS_PASSWORD }} | |
| integration-tests: | |
| name: Integration Tests (bare metal) | |
| needs: build | |
| runs-on: ubuntu-26.04 | |
| timeout-minutes: 65 | |
| steps: | |
| # The runner ships the Compose plugin only, the action still calls the docker-compose binary to export the logs | |
| - name: Expose docker compose as docker-compose | |
| run: printf '#!/bin/sh\nexec docker compose "$@"\n' | sudo install /dev/stdin /usr/local/bin/docker-compose | |
| # The tests expect to reach Jahia as http://jahia:8080, like the cypress container did | |
| - name: Resolve jahia to the host | |
| run: echo "127.0.0.1 jahia" | sudo tee -a /etc/hosts | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: jdx/mise-action@7e36c90d9ab29c415a2384db3006f3ec8a8cc654 # v4.2.4 | |
| - name: Cache the Cypress binary and the yarn cache | |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4 | |
| with: | |
| path: | | |
| ~/.cache/Cypress | |
| ~/.yarn/berry/cache | |
| key: e2e-bare-metal-${{ runner.os }}-${{ hashFiles('tests/yarn.lock') }} | |
| - uses: jahia/jahia-modules-action/integration-tests@v2 | |
| with: | |
| module_id: javascript-modules-engine | |
| testrail_project: Javascript Modules Engine | |
| should_skip_testrail: true | |
| should_skip_zencrepes: true | |
| timeout_minutes: 50 | |
| tests_manifest: provisioning-manifest-build.yml | |
| jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT | |
| jahia_license: ${{ secrets.JAHIA_LICENSE_8X_FULL }} | |
| ci_build_script: ci.build.bare-metal.sh | |
| ci_startup_script: ci.startup.bare-metal.sh | |
| github_artifact_name: bare-metal-js-eng-${{ github.run_number }} | |
| jahia_artifact_name: bare-metal-js-eng-${{ github.run_number }} | |
| tests_report_type: json | |
| tests_report_path: "artifacts/results/reports/report.json" | |
| 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 }} | |
| - name: Test Report | |
| uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0 | |
| if: success() || failure() | |
| with: | |
| name: Tests Report (bare metal) | |
| path: tests/artifacts/results/xml_reports/**/*.xml | |
| reporter: java-junit | |
| fail-on-error: "false" |