Skip to content

Commit

Permalink
chore: add ctrf reporter and run e2e tests after deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
KrijnL committed Aug 26, 2024
1 parent 49cc8bf commit 3113667
Show file tree
Hide file tree
Showing 6 changed files with 362 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,11 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Pause to let invalidation complete
run: |
sleep 180
Run_e2e_Tests:
needs: Invalidate_Cloudfront
uses: .github/workflows/e2e.yml
secrets: inherit
26 changes: 23 additions & 3 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: E2E tests
on:
workflow_call:
workflow_dispatch:
push:
branches: [ main, feat/workflow-for-e2e ]
schedule:
- cron: "30 9 * * *"
pull_request:
branches: [ main ]
types: [ opened, synchronize ]

jobs:
test:
timeout-minutes: 60
Expand Down Expand Up @@ -41,3 +42,22 @@ jobs:
e2e/playwright-report/
e2e/test-results/
retention-days: 10
- name: Run CTRF results
if: always()
run: |
npx github-actions-ctrf tests ctrf/ctrf-report.json --pr-comment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set test result outputs
id: set_test_outputs
if: always()
run: |
echo "TEST_COUNT=`jq '.results.summary.passed' < ./ctrf/ctrf-report.json`" >> $GITHUB_OUTPUT
echo "PASSED_TESTS=`jq '.results.summary.passed' < ./ctrf/ctrf-report.json`" >> $GITHUB_OUTPUT
echo "FAILED_TESTS=`jq '.results.summary.failed' < ./ctrf/ctrf-report.json`" >> $GITHUB_OUTPUT
# - name: Send test output to Slack if failed
# needs: set_test_outputs
# if: needs.set_test_outputs.outputs.FAILED_TESTS > 0
# run: |
# echo "${{ needs.set_test_outputs.outputs.FAILED_TESTS }} out of ${{ needs.set_test_outputs.outputs.TEST_COUNT }} failed for luzmo showcases" >> $GITHUB_STEP_SUMMARY
1 change: 1 addition & 0 deletions e2e/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/playwright-report/
/blob-report/
/playwright/.cache/
/ctrf/
Loading

0 comments on commit 3113667

Please sign in to comment.