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

playwright pr comment #8370

Merged
merged 8 commits into from
Apr 30, 2024
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
18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: CI

on: push
on: [push, pull_request]
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR ID isn't available unless I include this pull_request trigger for the playwright summary. Though I'm a bit worried this may not work in a non-PR context

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This runs when we version main and when we cut release branches, neither of which are pull requests

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied convo from slack:

Eduardo
1:26 PM
Theoretically it should be fine to add the additional trigger pull_request since every kind of that event is also a push, right? Just with extra information

1:26
Though I did notice that pull_request will checkout the merged version of all the commits in the PR rather than the tip of the branch

Graham
1:27 PM
What happens when it's a push without a pull_request though?
1:28
Ex: https://github.com/pixiebrix/pixiebrix-extension/actions/runs/8837003915

Eduardo
1:29 PM
Theoretically it won't pass.
I can add a check for when not to run a step:
if: github.event_name != 'pull_request'

Copy link
Collaborator

@mnholtz mnholtz Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me what was decided here - could you clarify @fungairino ? I do see the github.event_name != 'pull_request' clause below.


env:
# Creates and uploads sourcemaps to Application error telemetry, and save the built extension as an artifact
Expand Down Expand Up @@ -238,13 +238,9 @@ jobs:
name: end-to-end-tests-report${{ matrix.PUBLIC_NAME }}
path: end-to-end-tests/.report
retention-days: 5
# Analyzer for checking for inclusive terminology in code. For more information, see
# https://github.com/microsoft/InclusivenessAnalyzer
Inclusiveness-Analyser-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Inclusiveness Analyzer
uses: microsoft/[email protected]
- uses: daun/playwright-report-summary@v3
with:
comment-title: "Playwright test results - MV${{matrix.MV}}"
report-file: end-to-end-tests/.report/report.json
report-tag: manifest-version-${{ matrix.MV }}
if: (success() || failure()) && github.event_name == 'pull_request'
13 changes: 13 additions & 0 deletions .github/workflows/inclusiveness-analyzer.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Inclusiveness Analyzer
on: push
jobs:
# Analyzer for checking for inclusive terminology in code. For more information, see
# https://github.com/microsoft/InclusivenessAnalyzer
Inclusiveness-Analyser-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Inclusiveness Analyzer
uses: microsoft/[email protected]
5 changes: 4 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export default defineConfig<{ chromiumChannel: string }>({
},
reportSlowTests: null,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [["html", { outputFolder: "./end-to-end-tests/.report" }]],
reporter: [
["html", { outputFolder: "./end-to-end-tests/.report" }],
["json", { outputFile: "./end-to-end-tests/.report/report.json" }],
],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down
Loading