@@ -134,6 +134,51 @@ jobs:
134134 LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"{\\\"application\\\":\\\"complete\\\",\\\"platform\\\":\\\"react\\\",\\\"run_type\\\":\\\"commitly\\\",\\\"execution_time\\\":$TIME,\\\"passed\\\":$PASSED,\\\"failed\\\":$FAILED,\\\"link\\\":\\\"https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}\\\"}\"}]"
135135 aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON"
136136
137+ - name : Run Connect tests for react
138+ run : |
139+ cd packages/tests-e2e
140+ BRANCH_NAME=$(echo $BRANCH_NAME_RAW | tr '/_' '-')
141+ export PLAYWRIGHT_TEST_URL="https://$BRANCH_NAME.connect-next.playground.corbado.io"
142+ set +e
143+ npx playwright test --config=playwright.config.connect.ts
144+ EXIT_CODE=$?
145+ if [ $EXIT_CODE -ne 0 ]; then
146+ echo "CONNECT_REACT_FAILED=true" >> $GITHUB_ENV
147+ fi
148+ env :
149+ PLAYWRIGHT_NUM_CORES : 4
150+ BACKEND_API_BASIC_AUTH : ${{ secrets.BACKEND_API_BASIC_AUTH }}
151+ PLAYWRIGHT_CONNECT_PROJECT_ID : ${{ secrets.PLAYWRIGHT_CONNECT_PROJECT_ID }}
152+ PLAYWRIGHT_NGROK_AUTH_TOKEN : ${{ secrets.PLAYWRIGHT_NGROK_AUTH_TOKEN }}
153+ GITHUB_RUN_ID : ${{ github.run_id }}
154+ SLACK_BOT_USER_OAUTH_TOKEN : ${{ secrets.SLACK_BOT_USER_OAUTH_TOKEN }}
155+ GITHUB_BRANCH_NAME : ${{ env.BRANCH_NAME_RAW }}
156+ continue-on-error : true
157+
158+ - uses : actions/upload-artifact@v4
159+ with :
160+ name : playwright-report-connect-react
161+ path : packages/tests-e2e/playwright-report/
162+ retention-days : 30
163+
164+ - name : Send logs to AWS CloudWatch
165+ env :
166+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
167+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
168+ AWS_REGION : ${{ secrets.AWS_REGION }}
169+ run : |
170+ cd packages/tests-e2e
171+ TESTS=$(xmllint --xpath 'string(/testsuites/@tests)' test-results/results.xml)
172+ FAILURES=$(xmllint --xpath 'string(/testsuites/@failures)' test-results/results.xml)
173+ SKIPPED=$(xmllint --xpath 'string(/testsuites/@skipped)' test-results/results.xml)
174+ ERRORS=$(xmllint --xpath 'string(/testsuites/@errors)' test-results/results.xml)
175+ TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml)
176+ PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED))
177+ FAILED=$((FAILURES + ERRORS))
178+ TIMESTAMP=$(date +%s000)
179+ LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"{\\\"application\\\":\\\"connect\\\",\\\"platform\\\":\\\"react\\\",\\\"run_type\\\":\\\"commitly\\\",\\\"execution_time\\\":$TIME,\\\"passed\\\":$PASSED,\\\"failed\\\":$FAILED,\\\"link\\\":\\\"https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}\\\"}\"}]"
180+ aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON"
181+
137182 - name : Aggregate results
138183 run : |
139184 FAILED_STEPS=""
0 commit comments