Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/shared-run-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
110 changes: 67 additions & 43 deletions github-actions/setup-e2e-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,48 @@ runs:
--wildcards 'jore4-docker-compose-bundle-main/docker-compose/*'
shell: bash

- name: Start e2e environment
# use environment variables within the docker-compose bundle to override some images
env:
UI_DOCKER_IMAGE: ${{ inputs.ui_version }}
HASURA_DOCKER_IMAGE: ${{ inputs.hasura_version }}
AUTH_DOCKER_IMAGE: ${{ inputs.auth_version }}
MBTILES_DOCKER_IMAGE: ${{ inputs.mbtiles_version }}
JORE3IMPORTER_DOCKER_IMAGE: ${{ inputs.jore3importer_version }}
TESTDB_DOCKER_IMAGE: ${{ inputs.testdb_version }}
MSSQLTESTDB_DOCKER_IMAGE: ${{ inputs.mssqltestdb_version }}
MAPMATCHING_DOCKER_IMAGE: ${{ inputs.mapmatching_version }}
MAPMATCHINGDB_DOCKER_IMAGE: ${{ inputs.mapmatchingdb_version }}
CYPRESS_DOCKER_IMAGE: ${{ inputs.cypress_version }}
HASTUS_DOCKER_IMAGE: ${{ inputs.hastus_version }}
TIMETABLESAPI_DOCKER_IMAGE: ${{ inputs.timetablesapi_version }}
TIAMAT_DOCKER_IMAGE: ${{ inputs.tiamat_version }}
- name: Set environment variables for Docker Compose bundle
shell: bash
run: |
cat >>${GITHUB_ENV} <<EOF
UI_DOCKER_IMAGE=${{ inputs.ui_version }}
HASURA_DOCKER_IMAGE=${{ inputs.hasura_version }}
AUTH_DOCKER_IMAGE=${{ inputs.auth_version }}
MBTILES_DOCKER_IMAGE=${{ inputs.mbtiles_version }}
JORE3IMPORTER_DOCKER_IMAGE=${{ inputs.jore3importer_version }}
TESTDB_DOCKER_IMAGE=${{ inputs.testdb_version }}
MSSQLTESTDB_DOCKER_IMAGE=${{ inputs.mssqltestdb_version }}
MAPMATCHING_DOCKER_IMAGE=${{ inputs.mapmatching_version }}
MAPMATCHINGDB_DOCKER_IMAGE=${{ inputs.mapmatchingdb_version }}
CYPRESS_DOCKER_IMAGE=${{ inputs.cypress_version }}
HASTUS_DOCKER_IMAGE=${{ inputs.hastus_version }}
TIMETABLESAPI_DOCKER_IMAGE=${{ inputs.timetablesapi_version }}
TIAMAT_DOCKER_IMAGE=${{ inputs.tiamat_version }}
EOF

# 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 ${{ 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
Expand Down Expand Up @@ -242,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
Expand All @@ -263,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
Expand All @@ -307,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:
Expand Down