Skip to content

Commit b5afc28

Browse files
committed
feat: adds option to use same server for app and test
- Required for tests in the auth-react repo itself
1 parent 2dfbcdf commit b5afc28

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

setup/action.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ inputs:
2727
required: false
2828
default: 'true'
2929

30+
use-common-app-and-test-server:
31+
description: Use the same server as the App and Test server. `APP_SERVER` will be set to the same value as `NODE_PORT`.
32+
required: false
33+
default: 'false'
34+
3035
outputs:
3136
AUTH_REACT__LOG_DIR:
3237
description: Log directory for various processes
@@ -74,8 +79,15 @@ runs:
7479
run: |
7580
echo "AUTH_REACT__LOG_DIR=${{ github.workspace }}/${{ inputs.path }}/test_report/logs" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
7681
echo "AUTH_REACT__SCREENSHOT_DIR=${{ github.workspace }}/${{ inputs.path }}/test_report/screenshots" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
77-
echo "AUTH_REACT__APP_SERVER=8083" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
82+
7883
echo "AUTH_REACT__NODE_PORT=8082" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
84+
85+
if [ "${{ inputs.use-common-app-and-test-server }}" == 'true' ]; then
86+
echo "AUTH_REACT__APP_SERVER=8082" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
87+
else
88+
echo "AUTH_REACT__APP_SERVER=8083" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
89+
fi
90+
7991
echo "AUTH_REACT__TEST_MODE=testing" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
8092
echo "AUTH_REACT__PORT=3031" | tee -a "$GITHUB_OUTPUT" "$GITHUB_ENV"
8193

0 commit comments

Comments
 (0)