From 34709853c31d1fa9a968d25f81032113826ddc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20R=C3=B6nkk=C3=B6?= Date: Wed, 24 Sep 2025 09:59:39 +0300 Subject: [PATCH 1/5] Run E2E tests on 8 parallel runners --- .github/workflows/shared-run-e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/shared-run-e2e.yml b/.github/workflows/shared-run-e2e.yml index 44a4d92..0f266a9 100644 --- a/.github/workflows/shared-run-e2e.yml +++ b/.github/workflows/shared-run-e2e.yml @@ -151,7 +151,7 @@ jobs: strategy: fail-fast: false matrix: - containers: [1, 2, 3, 4] + containers: [1, 2, 3, 4, 5, 6, 7, 8] steps: - name: Start e2e env id: start-e2e-env From d54f0f12a3de71398d0ac7f8f5f82a167b61bf6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20R=C3=B6nkk=C3=B6?= Date: Tue, 23 Sep 2025 15:44:44 +0300 Subject: [PATCH 2/5] Reformat docker compose up command to be more readable --- github-actions/setup-e2e-environment/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/github-actions/setup-e2e-environment/action.yml b/github-actions/setup-e2e-environment/action.yml index 376fc9c..ce6b173 100644 --- a/github-actions/setup-e2e-environment/action.yml +++ b/github-actions/setup-e2e-environment/action.yml @@ -147,7 +147,11 @@ runs: TIMETABLESAPI_DOCKER_IMAGE: ${{ inputs.timetablesapi_version }} TIAMAT_DOCKER_IMAGE: ${{ inputs.tiamat_version }} run: | - docker compose -f ${{ github.workspace }}/docker/docker-compose.yml ${{ inputs.custom_docker_compose != '' && format('-f {0}', inputs.custom_docker_compose) || '' }} ${{ inputs.start_jore3_importer == 'true' && '--profile importer' || '' }} up -d + docker compose \ + -f ${{ github.workspace }}/docker/docker-compose.yml \ + ${{ inputs.custom_docker_compose != '' && format('-f {0}', inputs.custom_docker_compose) || '' }} \ + ${{ inputs.start_jore3_importer == 'true' && '--profile importer' || '' }} \ + up -d shell: bash - name: Show which versions of the docker images are spun up From 1f5b310e810cd5f3f2a6b11e69e50f7a59ccbfb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20R=C3=B6nkk=C3=B6?= Date: Wed, 24 Sep 2025 08:15:47 +0300 Subject: [PATCH 3/5] Set environment variables for JORE4 Docker Compose bundle for all steps in setup-e2e-environment GHA action This allows the variables to be used in multiple steps; new steps using these variables will be added in a later commit --- .../setup-e2e-environment/action.yml | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/github-actions/setup-e2e-environment/action.yml b/github-actions/setup-e2e-environment/action.yml index ce6b173..b0245e3 100644 --- a/github-actions/setup-e2e-environment/action.yml +++ b/github-actions/setup-e2e-environment/action.yml @@ -130,22 +130,26 @@ runs: --wildcards 'jore4-docker-compose-bundle-main/docker-compose/*' shell: bash + - name: Set environment variables for Docker Compose bundle + shell: bash + run: | + cat >>${GITHUB_ENV} < Date: Wed, 24 Sep 2025 10:43:38 +0300 Subject: [PATCH 4/5] Start testdb, hasura, tiamat and auth before other services --- .../setup-e2e-environment/action.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/github-actions/setup-e2e-environment/action.yml b/github-actions/setup-e2e-environment/action.yml index b0245e3..b5f6234 100644 --- a/github-actions/setup-e2e-environment/action.yml +++ b/github-actions/setup-e2e-environment/action.yml @@ -149,7 +149,23 @@ runs: TIAMAT_DOCKER_IMAGE=${{ inputs.tiamat_version }} EOF - - name: Start e2e environment + # The services that take a long while to start are started first so they can start in the background while + # Docker images for the rest of the services are being downloaded + - name: Start e2e environment (pre) + run: | + docker compose \ + -f ${{ github.workspace }}/docker/docker-compose.yml \ + ${{ inputs.custom_docker_compose != '' && format('-f {0}', inputs.custom_docker_compose) || '' }} \ + ${{ inputs.start_jore3_importer == 'true' && '--profile importer' || '' }} \ + up -d \ + jore4-testdb \ + jore4-hasura \ + jore4-tiamat \ + jore4-auth \ + + shell: bash + + - name: Start e2e environment (all remaining) run: | docker compose \ -f ${{ github.workspace }}/docker/docker-compose.yml \ From dd1be9145b1acfd019f506f64d44967efcde963a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janne=20R=C3=B6nkk=C3=B6?= Date: Wed, 24 Sep 2025 11:18:17 +0300 Subject: [PATCH 5/5] Reorder service startup verify checks As the checks use sleep, put the slowest services at the end to minimize the amount of sleeping --- .../setup-e2e-environment/action.yml | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/github-actions/setup-e2e-environment/action.yml b/github-actions/setup-e2e-environment/action.yml index b5f6234..a38257a 100644 --- a/github-actions/setup-e2e-environment/action.yml +++ b/github-actions/setup-e2e-environment/action.yml @@ -266,19 +266,6 @@ runs: "curl --fail http://localhost:3300/api/auth/actuator/health --output /dev/null --silent" - - name: Verify that mbtiles server is up and running standalone - uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 - with: - command: "curl --fail http://localhost:3203/services --output /dev/null - --silent" - - - name: Verify that mbtiles server is up and running through proxy - uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 - with: - command: - "curl --fail http://localhost:3300/api/mbtiles/services --output - /dev/null --silent" - - name: Verify that jore3 importer is up and running standalone if: ${{ inputs.start_jore3_importer == 'true' }} uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 @@ -287,29 +274,23 @@ runs: "curl --fail http://localhost:3004/actuator/health --output /dev/null --silent" - - name: Verify that map matching database is up and running standalone + - name: Verify that cypress test container is up and running standalone uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 with: - command: "pg_isready -h localhost -p 6433" + command: "docker exec cypress yarn cypress --version" - - name: Verify that map matching server is up and running standalone + - name: Verify that mbtiles server is up and running standalone uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 with: - command: - "curl --fail http://localhost:3005/actuator/health --output /dev/null + command: "curl --fail http://localhost:3203/services --output /dev/null --silent" - - name: Verify that map matching server is up and running through proxy + - name: Verify that mbtiles server is up and running through proxy uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 with: command: - "curl --fail http://localhost:3300/api/mapmatching/actuator/health - --output /dev/null --silent" - - - name: Verify that cypress test container is up and running standalone - uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 - with: - command: "docker exec cypress yarn cypress --version" + "curl --fail http://localhost:3300/api/mbtiles/services --output + /dev/null --silent" - name: Verify that hastus importer is up and running standalone uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 @@ -331,6 +312,25 @@ runs: command: "curl --fail http://localhost:3009/actuator/health --output /dev/null --silent" + - name: Verify that map matching database is up and running standalone + uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 + with: + command: "pg_isready -h localhost -p 6433" + + - name: Verify that map matching server is up and running standalone + uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 + with: + command: + "curl --fail http://localhost:3005/actuator/health --output /dev/null + --silent" + + - name: Verify that map matching server is up and running through proxy + uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 + with: + command: + "curl --fail http://localhost:3300/api/mapmatching/actuator/health + --output /dev/null --silent" + - name: Verify that tiamat is up and running standalone uses: HSLdevcom/jore4-tools/github-actions/healthcheck@healthcheck-v1 with: