File tree 2 files changed +27
-2
lines changed
2 files changed +27
-2
lines changed Original file line number Diff line number Diff line change 21
21
name : Integration Tests
22
22
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
23
23
runs-on : ubuntu-20.04
24
+ # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
25
+ strategy :
26
+ matrix :
27
+ # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-adding-configurations
28
+ include :
29
+ # "docker-service-name" must match "services.$name" from docker-compose.yaml
30
+ # "application-port" must match "services.$name.environment:PORT" from docker-compose.yaml
31
+ - docker-service-name : ' express-js'
32
+ application-port : 3010
33
+ - service-name : ' express-ts'
34
+ application-port : 3020
24
35
steps :
25
36
26
37
- name : Clone source code
48
59
--build \
49
60
--detach \
50
61
--wait \
51
- express-js
62
+ ${{ matrix.docker-service-name }}
52
63
53
64
- name : Show container statuses
54
65
working-directory : docker
59
70
hurl \
60
71
--error-format long \
61
72
--report-html hurl-reports \
62
- --variable SERVER_URL=http://127.0.0.1:3010 \
73
+ --variable SERVER_URL=http://127.0.0.1:${{ matrix.application-port }} \
63
74
--test \
64
75
tests/crud.hurl
65
76
Original file line number Diff line number Diff line change @@ -43,3 +43,17 @@ services:
43
43
depends_on :
44
44
mysql :
45
45
condition : service_healthy
46
+
47
+ express-ts :
48
+ build : ../examples/ts/express/mysql
49
+ environment :
50
+ - DB_NAME=test
51
+ - DB_USER=test
52
+ - DB_PASSWORD=test
53
+ - DB_HOST=mysql # defaults to localhost
54
+ - PORT=3020 # defaults to 3000
55
+ ports :
56
+ - ' 3020:3020'
57
+ depends_on :
58
+ mysql :
59
+ condition : service_healthy
You can’t perform that action at this time.
0 commit comments