Skip to content

Commit a26e4f3

Browse files
committed
test(ci): verify hosted SCIM with the production artifact
1 parent 71e378a commit a26e4f3

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

‎.github/scripts/http-e2e.sh‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ realtime_pid=''
3333
realtime_tag=''
3434
realtime_log=''
3535
browsers_pid=''
36+
local_app_url=''
3637
# `dev` or `start`; a group sets it before start_app.
3738
app_server=${E2E_APP_SERVER:-dev}
3839

@@ -78,7 +79,8 @@ start_app() {
7879
status_log="$report_dir/$name-http-status.log"
7980
fi
8081
app_tag="$name-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT-$$"
81-
export NEXT_PUBLIC_APP_URL="http://127.0.0.1:$port"
82+
local_app_url="http://127.0.0.1:$port"
83+
export NEXT_PUBLIC_APP_URL="${E2E_APP_PUBLIC_URL:-$local_app_url}"
8284
export BETTER_AUTH_URL="$NEXT_PUBLIC_APP_URL"
8385
export DISABLE_TELEMETRY=true NEXT_TELEMETRY_DISABLED=1
8486
if [ "$app_server" = start ]; then
@@ -96,7 +98,7 @@ start_app() {
9698
--port "$port" > "$server_log" 2>&1 &
9799
fi
98100
server_pid=$!
99-
wait_ready "$server_pid" "$NEXT_PUBLIC_APP_URL/api/health" "$label app"
101+
wait_ready "$server_pid" "$local_app_url/api/health" "$label app"
100102
}
101103

102104
# start_realtime <name> <port>: the Socket.IO server the app's browser clients connect to, so pages
@@ -143,12 +145,12 @@ case "$group" in
143145
export DB_TX_TRIPWIRE=throw
144146
export NEXT_PUBLIC_CHAT_DISABLED=true
145147
start_app scim 3017 SCIM record-http-status
146-
SCIM_E2E_BASE_URL="$NEXT_PUBLIC_APP_URL" \
148+
SCIM_E2E_BASE_URL="$local_app_url" \
147149
SCIM_E2E_DATABASE_URL="$DATABASE_URL" \
148150
SCIM_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
149151
SCIM_E2E_REPORT_PATH="$report_dir/scim-e2e-report.json" \
150152
bun run test:scim:e2e
151-
VERSION_COMPARE_E2E_BASE_URL="$NEXT_PUBLIC_APP_URL" \
153+
VERSION_COMPARE_E2E_BASE_URL="$local_app_url" \
152154
VERSION_COMPARE_E2E_DATABASE_URL="$DATABASE_URL" \
153155
VERSION_COMPARE_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
154156
VERSION_COMPARE_E2E_REPORT_PATH="$report_dir/version-compare-http-report.json" \

‎.github/workflows/checks.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_test
4242
BETTER_AUTH_SECRET: http-e2e-ci-secret-at-least-32-characters
4343
E2E_APP_SERVER: start
44+
E2E_APP_PUBLIC_URL: ${{ matrix.group == 'scim' && 'http://scim-e2e.sim.ai:3017' || '' }}
45+
INTERNAL_API_BASE_URL: ${{ matrix.group == 'scim' && 'http://127.0.0.1:3017' || '' }}
46+
TRUSTED_ORIGINS: ${{ matrix.group == 'scim' && 'http://127.0.0.1:3017' || '' }}
4447
PROJECT_FILES_E2E_APP_SERVER: start
4548
ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000'
4649

@@ -88,6 +91,10 @@ jobs:
8891
cd "$addon_dir"
8992
bun run install
9093
94+
- name: Map the hosted SCIM fixture to loopback
95+
if: matrix.group == 'scim'
96+
run: printf '127.0.0.1 scim-e2e.sim.ai\n' | sudo tee -a /etc/hosts
97+
9198
# No step timeout: the job's bound covers a hang without cutting a slow but healthy suite
9299
# short of writing its report.
93100
- name: Run end-to-end suites

0 commit comments

Comments
 (0)