From b4e66b37eb0292846af88b4bfc2cc6fd8c064aad Mon Sep 17 00:00:00 2001 From: aehnh Date: Tue, 11 Feb 2025 19:19:17 +0100 Subject: [PATCH 1/2] convert commitly test logs to JSON format --- .github/workflows/deploy-playground-and-test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-playground-and-test.yml b/.github/workflows/deploy-playground-and-test.yml index f71646042..21ac3a698 100644 --- a/.github/workflows/deploy-playground-and-test.yml +++ b/.github/workflows/deploy-playground-and-test.yml @@ -210,9 +210,8 @@ jobs: TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml) PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED)) FAILED=$((FAILURES + ERRORS)) - SUMMARY="[Test Result] 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}" TIMESTAMP=$(date +%s000) - LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"$SUMMARY\"}]" + 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}\\\"}\"}]" aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON" - name: Run Connect tests for react @@ -256,9 +255,8 @@ jobs: TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml) PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED)) FAILED=$((FAILURES + ERRORS)) - SUMMARY="[Test Result] 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}" TIMESTAMP=$(date +%s000) - LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"$SUMMARY\"}]" + 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}\\\"}\"}]" aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON" - name: Aggregate results From df70093f3fdd4389d3d6e57718e6c3050c6b57c3 Mon Sep 17 00:00:00 2001 From: aehnh Date: Tue, 11 Feb 2025 19:56:18 +0100 Subject: [PATCH 2/2] convert nightly test logs to JSON format --- .github/workflows/test-all.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index 891642224..6341392fc 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -118,9 +118,8 @@ jobs: TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml) PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED)) FAILED=$((FAILURES + ERRORS)) - SUMMARY="[Test Result] application=complete platform=react run_type=nightly execution_time=$TIME passed=$PASSED failed=$FAILED link=https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}" TIMESTAMP=$(date +%s000) - LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"$SUMMARY\"}]" + LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"{\\\"application\\\":\\\"complete\\\",\\\"platform\\\":\\\"react\\\",\\\"run_type\\\":\\\"nightly\\\",\\\"execution_time\\\":$TIME,\\\"passed\\\":$PASSED,\\\"failed\\\":$FAILED,\\\"link\\\":\\\"https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}\\\"}\"}]" aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON" - name: Run Complete tests for web-js @@ -165,9 +164,8 @@ jobs: TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml) PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED)) FAILED=$((FAILURES + ERRORS)) - SUMMARY="[Test Result] application=complete platform=web-js run_type=nightly execution_time=$TIME passed=$PASSED failed=$FAILED link=https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}" TIMESTAMP=$(date +%s000) - LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"$SUMMARY\"}]" + LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"{\\\"application\\\":\\\"complete\\\",\\\"platform\\\":\\\"web-js\\\",\\\"run_type\\\":\\\"nightly\\\",\\\"execution_time\\\":$TIME,\\\"passed\\\":$PASSED,\\\"failed\\\":$FAILED,\\\"link\\\":\\\"https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}\\\"}\"}]" aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON" - name: Run Complete tests for web-js-script @@ -212,9 +210,8 @@ jobs: TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml) PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED)) FAILED=$((FAILURES + ERRORS)) - SUMMARY="[Test Result] application=complete platform=web-js-script run_type=nightly execution_time=$TIME passed=$PASSED failed=$FAILED link=https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}" TIMESTAMP=$(date +%s000) - LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"$SUMMARY\"}]" + LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"{\\\"application\\\":\\\"complete\\\",\\\"platform\\\":\\\"web-js-script\\\",\\\"run_type\\\":\\\"nightly\\\",\\\"execution_time\\\":$TIME,\\\"passed\\\":$PASSED,\\\"failed\\\":$FAILED,\\\"link\\\":\\\"https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}\\\"}\"}]" aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON" - name: Run Connect tests for react @@ -258,9 +255,8 @@ jobs: TIME=$(xmllint --xpath 'string(/testsuites/@time)' test-results/results.xml) PASSED=$((TESTS - FAILURES - ERRORS - SKIPPED)) FAILED=$((FAILURES + ERRORS)) - SUMMARY="[Test Result] application=connect platform=react run_type=nightly execution_time=$TIME passed=$PASSED failed=$FAILED link=https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}" TIMESTAMP=$(date +%s000) - LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"$SUMMARY\"}]" + LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"{\\\"application\\\":\\\"connect\\\",\\\"platform\\\":\\\"react\\\",\\\"run_type\\\":\\\"nightly\\\",\\\"execution_time\\\":$TIME,\\\"passed\\\":$PASSED,\\\"failed\\\":$FAILED,\\\"link\\\":\\\"https://github.com/corbado/javascript/actions/runs/${GITHUB_RUN_ID}\\\"}\"}]" aws logs put-log-events --log-group-name "test-results-board" --log-stream-name "$LOG_STREAM_NAME" --log-events "$LOG_EVENT_JSON" - name: Aggregate results