-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-setup-e2e-environment-action.yml
More file actions
119 lines (107 loc) · 4.44 KB
/
test-setup-e2e-environment-action.yml
File metadata and controls
119 lines (107 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Test setup e2e environment action
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test-e2e-setup-action:
runs-on: ubuntu-24.04
strategy:
matrix:
include:
# no overwrites for images
- ui-docker-image: ""
hasura-docker-image: ""
auth-docker-image: ""
mbtiles-docker-image: ""
jore3importer-docker-image: ""
testdb-docker-image: ""
mssqltestdb-docker-image: ""
mapmatching-docker-image: ""
mapmatchingdb-docker-image: ""
cypress-docker-image: ""
hastus-docker-image: ""
custom-docker-compose: ""
# overwrite some
- ui-docker-image: "hsldevcom/jore4-ui:latest"
hasura-docker-image: ""
auth-docker-image: ""
mbtiles-docker-image: ""
jore3importer-docker-image: ""
testdb-docker-image: ""
mssqltestdb-docker-image: ""
mapmatching-docker-image: ""
mapmatchingdb-docker-image: ""
cypress-docker-image: ""
hastus-docker-image: ""
custom-docker-compose: ""
# use custom docker-compose file
- ui-docker-image: ""
hasura-docker-image: ""
auth-docker-image: ""
mbtiles-docker-image: ""
jore3importer-docker-image: ""
testdb-docker-image: ""
mssqltestdb-docker-image: ""
mapmatching-docker-image: ""
mapmatchingdb-docker-image: ""
cypress-docker-image: ""
hastus-docker-image: ""
custom-docker-compose: "custom-compose.yml" # this overwrites the hasura image to be "jore4-hasura:latest"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Create a temporary custom docker compose file for testing
run: |
touch custom-compose.yml
echo "services:" >> custom-compose.yml
echo " jore4-hasura:" >> custom-compose.yml
echo " image: 'hsldevcom/jore4-hasura:latest'" >> custom-compose.yml
- name: start e2e env
uses: ./github-actions/setup-e2e-environment
with:
ui_version: ${{ matrix.ui-docker-image }}
hasura_version: ${{ matrix.hasura-docker-image }}
auth_version: ${{ matrix.auth-docker-image }}
mbtiles_version: ${{ matrix.mbtiles-docker-image }}
jore3importer_version: ${{ matrix.jore3importer-docker-image }}
testdb_version: ${{ matrix.testdb-docker-image }}
mssqltestdb_version: ${{ matrix.mssqltestdb-docker-image }}
mapmatching_version: ${{ matrix.mapmatching-docker-image }}
mapmatchingdb_version: ${{ matrix.mapmatchingdb-docker-image }}
cypress_version: ${{ matrix.cypress-docker-image }}
hastus_version: ${{ matrix.hastus-docker-image }}
custom_docker_compose: ${{ matrix.custom-docker-compose }}
- name: Check that correct version of UI is running
run: |
UI_DEPLOYED_VERSION=`docker inspect --format='{{.Config.Image}}' ui`
if [[ "${{ matrix.ui-docker-image }}" == "" && "$UI_DEPLOYED_VERSION" == "${{ matrix.ui-docker-image }}" ]]
then
echo "Error! The docker image version shouldn't have been overwritten!"
exit 1
fi
if [[ "${{ matrix.ui-docker-image }}" != "" && "$UI_DEPLOYED_VERSION" != "${{ matrix.ui-docker-image }}" ]]
then
echo "Error! The docker image version should've been overwritten!"
exit 1
fi
- name:
Check that correct version of HASURA is running (overwritten by custom
docker compose file)
run: |
HASURA_DEPLOYED_VERSION=`docker inspect --format='{{.Config.Image}}' hasura`
if [[ "${{ matrix.custom-docker-compose }}" == "" && "$HASURA_DEPLOYED_VERSION" == "hsldevcom/jore4-hasura:latest" ]]
then
echo "Error! The docker image version shouldn't have been overwritten!"
exit 1
fi
if [[ "${{ matrix.custom-docker-compose }}" != "" && "$HASURA_DEPLOYED_VERSION" != "hsldevcom/jore4-hasura:latest" ]]
then
echo "Error! The docker image version should've been overwritten!"
exit 1
fi
- name: Seed infrastructure links
uses: ./github-actions/seed-infrastructure-links