From a50b624842fb934fb11932439e4d87e8392ddfc9 Mon Sep 17 00:00:00 2001 From: Olivia Guyot Date: Tue, 23 Jul 2024 11:24:19 +0200 Subject: [PATCH] ci: run e2e tests with various GN versions --- .github/workflows/checks.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 96aeaa13e3..6c79175de2 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -142,11 +142,12 @@ jobs: comment_tag: build-options GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - cypress-run: - name: End-to-end tests + e2e-run: + name: End-to-end tests, GeoNetwork v${{ matrix.gn_version }} runs-on: ubuntu-latest - outputs: - screenshotsUrl: ${{ steps.upload-screenshots.outputs.artifact-url }} + strategy: + matrix: + gn_version: [4.2.2, 4.2.8, 4.4.0] steps: - uses: actions/checkout@v4 @@ -156,24 +157,30 @@ jobs: node-version: ${{ env.NODE_VERSION }} cache: 'npm' + - name: Derive appropriate SHAs for base and head for `nx affected` commands + uses: nrwl/nx-set-shas@v3 + - name: Create pipeline docker image run: cd tools && docker build . -f pipelines/Dockerfile -t geonetwork/geonetwork-ui-tools-pipelines:latest - - name: Build the backend - run: sudo docker-compose -f support-services/docker-compose.yml up -d init + - name: Start up backend support services + env: + GEONETWORK_VERSION: ${{ matrix.gn_version }} + working-directory: support-services + run: docker compose up -d init - name: Install dependencies run: | npm ci - - name: Run tests - run: npx nx run-many --target=e2e + - name: Run e2e tests + run: npx nx affected --target=e2e --parallel=3 - uses: actions/upload-artifact@v4 if: always() id: upload-screenshots with: - name: cypress-screenshots + name: cypress-screenshots-gn-${{ matrix.gn_version }} path: | apps/datahub-e2e/cypress/screenshots/**/* apps/metadata-editor-e2e/cypress/screenshots/**/*