-
Notifications
You must be signed in to change notification settings - Fork 32
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
Playwright: Use new GH Pages actions #1504
Conversation
- uses: actions/checkout@v4 | ||
- name: Publish report | ||
## todo: change to main branch once the pr is merged | ||
uses: grafana/plugin-actions/playwright-gh-pages/deploy-report-pages@main |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
Uses Step
uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@main | ||
if: $\{{ always() && !cancelled() }} | ||
with: | ||
upload-report: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means the report won't be uploaded to GH artifacts, and therefore not deployed to GH pages in the next job.
if: ${{ github.repository_owner == 'grafana' && (failure() && steps.run-tests.outcome == 'failure') }} | ||
uses: grafana/plugin-actions/publish-report@main | ||
- name: Upload e2e test summary | ||
uses: grafana/plugin-actions/playwright-gh-pages/upload-report-artifacts@main |
Check warning
Code scanning / CodeQL
Unpinned tag for a non-immutable Action in workflow Medium
Uses Step
packages/create-plugin/templates/_partials/frontend-getting-started.md
Outdated
Show resolved
Hide resolved
…arted.md Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Playwright test results
Troubleshooting404 when clicking on
|
What this PR does / why we need it:
This PR uses the new actions to publish Playwright reports to Github Pages rather than uploading them as artifacts or deploying them to GCS.
Playwright tests running as part of plugin-e2e CI (playwright.yml)
Reports where at least one of the tests are now being deployed to GH Pages. A report comment is added to the PR with a summary of all the runs (see example at the bottom of this PR.
Scaffolded plugins
Like today, we don't want to upload reports as artifacts or deploy them to GH Pages automatically, as reports may include secrets (no directly after them being scaffolded, but if actively changed by plugin authors). For that reason, the necessary actions (
upload-report-artifacts
anddeploy-report-pages
) are added to the CI.yml workflow, however theupload-report
is set tofalse
meaning the report won't be uploaded to GH artifacts. While running tests as part of CI, a comment with a test result matrix will be added including a note describing how to enable publishing to GH pages.Documentation
The example workflows showcased in the e2e CI docs are updated. There's also a detailed step by step instructions on how to add support for publishing reports. This will be useful for all plugins that have been scaffolded with an older version of create-plugin.
Example of this feature being used in external plugins:
Which issue(s) this PR fixes:
Fixes #1456
Special notes for your reviewer:
Since a while back, I've had a PR open to run e2e tests that run as part of create-plugin changes in two Grafana versions. I've updated this PR too so that it also publishes reports to GH actions.
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
npm install website@3.6.0-canary.1504.c3ff863.0 npm install @grafana/create-plugin@5.15.0-canary.1504.c3ff863.0 # or yarn add website@3.6.0-canary.1504.c3ff863.0 yarn add @grafana/create-plugin@5.15.0-canary.1504.c3ff863.0