File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 28
28
- name : Extract port from cypress.json
29
29
id : vars
30
30
run : |
31
- apiUrl=$(jq -r '.env.apiUrl' ./cypress.json)
31
+ apiUrl=$(jq -r '.env.apiUrl // .baseUrl // empty' ./cypress.json)
32
+ if [[ -z "$apiUrl" ]]; then
33
+ echo "API URL or Base URL not found in cypress.json."
34
+ exit 1
35
+ fi
32
36
port=$(echo $apiUrl | grep -o '[0-9]\+')
37
+ if [[ -z "$port" ]]; then
38
+ echo "Port not found in URL."
39
+ exit 1
40
+ fi
33
41
echo "Extracted port: $port"
34
42
echo "::set-output name=port::$port"
35
43
- name : Run tests
58
66
- name : Extract port from cypress.json
59
67
id : vars
60
68
run : |
61
- apiUrl=$(jq -r '.env.apiUrl' ./cypress.json)
69
+ apiUrl=$(jq -r '.env.apiUrl // .baseUrl // empty' ./cypress.json)
70
+ if [[ -z "$apiUrl" ]]; then
71
+ echo "API URL or Base URL not found in cypress.json."
72
+ exit 1
73
+ fi
62
74
port=$(echo $apiUrl | grep -o '[0-9]\+')
75
+ if [[ -z "$port" ]]; then
76
+ echo "Port not found in URL."
77
+ exit 1
78
+ fi
63
79
echo "Extracted port: $port"
64
80
echo "::set-output name=port::$port"
65
81
- name : Run tests
You can’t perform that action at this time.
0 commit comments