Skip to content

Commit

Permalink
playwright pr comment (#8370)
Browse files Browse the repository at this point in the history
* adding playwright report summary for PRs

* fix name

* test adding on pull_request trigger

* separating out inclusiveness analyzer

* better comment title

* only add comment if action is PR

* Always report on failure
  • Loading branch information
fungairino authored Apr 30, 2024
1 parent 8c1d45e commit 4a22a74
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
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]

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

0 comments on commit 4a22a74

Please sign in to comment.