Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Playwright github reporter in CI #89

Merged
merged 1 commit into from
May 24, 2024

Conversation

hongrich
Copy link
Contributor

@hongrich hongrich commented May 24, 2024

In Github Actions CI, there is no colour which makes "expected failures" (green x in terminal) look like real failures (red x in terminal). Playwright has a built-in github reporter and we can conditionally use it in CI as shown in https://playwright.dev/docs/test-reporters#github-actions-annotations

This works more like the dot reporter when things are working properly (but only prints an entire row at a time) and adds an annotation to the pull request when there is a failure.

A successful run https://github.com/dropbox/ttvc/actions/runs/9229125586/job/25394647024?pr=89
image

A failure run and inline annotation https://github.com/dropbox/ttvc/actions/runs/9229194092/job/25394874559?pr=89
image
image

@hongrich hongrich force-pushed the hongrich/playwright-github-reporter branch from f30873e to fe5b5b3 Compare May 24, 2024 20:07
@hongrich hongrich requested a review from ajhyndman May 24, 2024 20:07
@hongrich hongrich marked this pull request as ready for review May 24, 2024 20:07
@hongrich hongrich merged commit d5963bf into main May 24, 2024
7 checks passed
@hongrich hongrich deleted the hongrich/playwright-github-reporter branch May 24, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants