Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/e2e-test-commitly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,27 @@ jobs:
path: packages/tests-e2e/playwright-report/
retention-days: 30

- name: Send logs to AWS CloudWatch
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: |
cat test-results/results.xml
TESTS=$(xmllint --xpath 'string(/testsuites/@tests)' test-results/results.xml)
FAILURES=$(xmllint --xpath 'string(/testsuites/@failures)' test-results/results.xml)
SKIPPED=$(xmllint --xpath 'string(/testsuites/@skipped)' test-results/results.xml)
ERRORS=$(xmllint --xpath 'string(/testsuites/@errors)' test-results/results.xml)
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"
TIMESTAMP=$(date +%s000)
LOG_STREAM_NAME="complete-$TIMESTAMP"
aws logs create-log-stream --log-group-name "test-results-board" --log-stream-name "&LOG_STREAM_NAME"
LOG_EVENT_JSON="[{\"timestamp\":$TIMESTAMP,\"message\":\"$SUMMARY\"}]"
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
run: |
cd packages/tests-e2e
Expand Down
1 change: 1 addition & 0 deletions packages/tests-e2e/playwright.config.complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export default defineConfig({
},
],
['html'],
['junit', { outputFile: 'test-results/results.xml' }],
],
timeout: totalTimeout, // default: 30000ms
expect: {
Expand Down
1 change: 1 addition & 0 deletions packages/tests-e2e/playwright.config.connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default defineConfig({
},
],
['html'],
['junit', { outputFile: 'test-results/results.xml' }],
],
timeout: totalTimeout, // default: 30000ms
expect: {
Expand Down