Skip to content

Commit

Permalink
ci: run e2e tests with various GN versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jahow committed Jul 23, 2024
1 parent 31a0c25 commit 0d418bd
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -156,24 +157,32 @@ 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@v2
with:
main-branch-name: 'main'

- 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/**/*
Expand Down

0 comments on commit 0d418bd

Please sign in to comment.