Skip to content

Commit

Permalink
ci: run e2e tests with various GN versions
Browse files Browse the repository at this point in the history
minor improvements to init pipeline to ease out bug fixing
  • Loading branch information
jahow committed Jul 23, 2024
1 parent 15ae452 commit fc90a5b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cypress-run:
name: End-to-end tests
name: End-to-end tests, GeoNetwork v${{ matrix.gn_version }}
runs-on: ubuntu-latest
strategy:
matrix:
gn_version: [4.2.2, 4.2.8, 4.4.0]
outputs:
screenshotsUrl: ${{ steps.upload-screenshots.outputs.artifact-url }}
steps:
Expand All @@ -160,7 +163,10 @@ jobs:
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
env:
GEONETWORK_VERSION: ${{ matrix.gn_version }}
working-directory: support-services
run: docker compose up -d init

- name: Install dependencies
run: |
Expand Down
16 changes: 3 additions & 13 deletions support-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,14 @@ services:
-Dgeonetwork.data.dir=/catalogue-data/data
-Dgeonetwork.codeList.dir=/catalogue-data/config/codelist
-Dgeonetwork.schema.dir=/catalogue-data/config/schema_plugins
# These are needed for GN 4.4.x versions; will be ignored otherwise
GN_CONFIG_PROPERTIES: >-
-Dgeonetwork.dir=/catalogue-data
-Dgeonetwork.formatter.dir=/catalogue-data/data/formatter
-Dgeonetwork.schema.dir=/opt/geonetwork/WEB-INF/data/config/schema_plugins
-Dgeonetwork.indexConfig.dir=/opt/geonetwork/WEB-INF/data/config/index
-Dgeonetwork.schemapublication.dir=/opt/geonetwork/WEB-INF/data/resources/schemapublication
-Dgeonetwork.htmlcache.dir=/opt/geonetwork/WEB-INF/data/resources/htmlcache
-Dgeonetwork.config.dir=/catalogue-data/config
-Dgeonetwork.indexConfig.dir=/catalogue-data/config/index
-Des.host=elasticsearch
-Des.protocol=http
-Des.port=9200
-Des.url=http://elasticsearch:9200
-Des.username=
-Des.password=
-Dgeonetwork.ESFeaturesProxy.targetUri=http://elasticsearch:9200/gn-features/{_}
-Dgeonetwork.HttpDashboardProxy.targetUri=http://kibana:5601
-Dgeonetwork.MicroServicesProxy.targetUri=http://ogc-api-records-service:8080
depends_on:
database:
condition: service_healthy
Expand Down Expand Up @@ -144,7 +134,7 @@ services:
init:
image: alpine/curl
# only run init if volumes were cleared
command: sh -c "if [ ! -f /done ]; then run-parts /docker-entrypoint.d --exit-on-error; else echo 'Nothing to do.'; exit 0; fi"
command: sh -c -e "if [ ! -f /done ]; then run-parts /docker-entrypoint.d --exit-on-error; else echo 'Nothing to do.'; exit 0; fi"
environment:
GEONETWORK_VERSION: ${GEONETWORK_VERSION}
depends_on:
Expand Down
1 change: 1 addition & 0 deletions support-services/docker-entrypoint.d/04-upload-thesauri.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ do
-H 'Accept: application/json, text/plain, */*' \
-H "Cookie: JSESSIONID=$jsessionid; XSRF-TOKEN=$xsrf_token" \
-H "X-XSRF-TOKEN: $xsrf_token"
echo ""
done

0 comments on commit fc90a5b

Please sign in to comment.