Skip to content

Commit

Permalink
revert: back to playwright-merge-html-reports
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorten committed Dec 27, 2023
1 parent 1774ed6 commit 2f6aa7d
Show file tree
Hide file tree
Showing 8 changed files with 129 additions and 28 deletions.
37 changes: 18 additions & 19 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
run: yarn test ./src/macOsVoiceOver.spec.ts --config macos.config.ts --shard ${{ matrix.shardIndex }}/2000
continue-on-error: true

- name: Archive Playwright Artifacts
- name: Upload Playwright Artifacts
uses: actions/upload-artifact@v4
if: always()
continue-on-error: true
Expand All @@ -172,13 +172,13 @@ jobs:
./test-results
./recordings
- name: Archive Blob Artifacts
- name: Upload HTML Report Artifacts
uses: actions/upload-artifact@v4
if: always()
continue-on-error: true
with:
name: blob-report-macos-voiceover-${{ matrix.shardIndex }}
path: ./blob-report
name: playwright-report-macos-voiceover-${{ matrix.shardIndex }}
path: ./playwright-report

test-nvda-preview:
name: Playwright NVDA Reduced Tests (${{ matrix.shardIndex }} / 1)
Expand Down Expand Up @@ -226,7 +226,7 @@ jobs:
run: yarn test ./src/windowsNvda.spec.ts --config windows.config.ts --shard ${{ matrix.shardIndex }}/2000
continue-on-error: true

- name: Archive Playwright Artifacts
- name: Upload Playwright Artifacts
uses: actions/upload-artifact@v4
if: always()
continue-on-error: true
Expand All @@ -236,13 +236,13 @@ jobs:
./test-results
./recordings
- name: Archive Blob Artifacts
- name: Upload HTML Report Artifacts
uses: actions/upload-artifact@v4
if: always()
continue-on-error: true
with:
name: blob-report-windows-nvda-${{ matrix.shardIndex }}
path: ./blob-report
name: playwright-report-windows-nvda-${{ matrix.shardIndex }}
path: ./playwright-report

publish-preview-html-report:
name: Publish Preview HTML Report To Vercel
Expand Down Expand Up @@ -289,14 +289,13 @@ jobs:

- uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: blob-report-*
path: ./blob-report
pattern: playwright-report-*
path: ./playwright-report

- name: Log Directory Structure
run: |
ls -la ./
ls -la ./blob-report
ls -la ./playwright-report
- name: Cache node_modules
uses: actions/cache@v3
Expand All @@ -306,22 +305,22 @@ jobs:
node_modules
key: macos-modules-${{ hashFiles('yarn.lock') }}-${{ hashFiles('package.json') }}

- name: Merge Into HTML Report
run: npx playwright merge-reports --config=merge.config.ts ./blob-report
- name: Create Test Report
run: yarn test:report

- name: Cleanup Downloads
run: rm -rf ./blob-report || true
run: rm -rf ./playwright-report || true

- name: Log Directory Structure
run: |
ls -la ./
ls -la ./playwright-report
ls -la ./html-report
- name: Upload HTML Report Artifact
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: playwright-report
name: html-report
path: html-report

- name: Deploy HTML Report to Vercel
uses: amondnet/vercel-action@v25
Expand All @@ -332,7 +331,7 @@ jobs:
vercel-project-id: ${{ secrets.PREVIEW_VERCEL_PROJECT_ID }}
github-comment: true
github-token: ${{ secrets.GITHUB_TOKEN }}
working-directory: playwright-report
working-directory: html-report

- name: Update Deployment Status - Finish
uses: bobheadxi/deployments@v1
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,5 @@ recordings
playwright-report
html-report
testSuites.json
blob-report

.vercel
2 changes: 1 addition & 1 deletion macos.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const config: PlaywrightTestConfig = {
use: { ...devices["Desktop Chrome"], headless: false },
},
],
reporter: process.env.CI ? [["github"], ["blob"]] : "list",
reporter: process.env.CI ? [["github"], ["html", { open: "never" }]] : "list",
};

export default config;
3 changes: 0 additions & 3 deletions merge.config.ts

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"@guidepup/guidepup": "^0.20.0",
"@guidepup/playwright": "^0.11.0",
"@playwright/test": "^1.40.1",
"csvtojson": "^2.0.10"
"csvtojson": "^2.0.10",
"playwright-merge-html-reports": "^0.2.8"
},
"devDependencies": {
"@types/node": "^20.10.5",
Expand Down
18 changes: 18 additions & 0 deletions src/report.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { readdirSync } from "fs";
import { join } from "path";
import { mergeHTMLReports } from "playwright-merge-html-reports";

const reportPathsToMerge = readdirSync(
join(process.cwd(), "playwright-report"),
{
withFileTypes: true,
}
)
.filter(
(item) => item.isDirectory() && item.name.startsWith("playwright-report")
)
.map(({ name }) => join(process.cwd(), "playwright-report", name));

mergeHTMLReports(reportPathsToMerge, {
outputFolderName: "html-report",
});
2 changes: 1 addition & 1 deletion windows.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config: PlaywrightTestConfig = {
use: { ...devices["Desktop Chrome"], headless: false },
},
],
reporter: process.env.CI ? [["github"], ["blob"]] : "list",
reporter: process.env.CI ? [["github"], ["html", { open: "never" }]] : "list",
};

export default config;
91 changes: 89 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ braces@^3.0.2:
dependencies:
fill-range "^7.0.1"

buffer-crc32@~0.2.3:
version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==

buffer-from@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
Expand Down Expand Up @@ -771,6 +776,11 @@ ignore@^5.2.4:
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78"
integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==

immediate@~3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==

import-fresh@^3.2.1:
version "3.3.0"
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
Expand All @@ -792,7 +802,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"

inherits@2, inherits@^2.0.3, inherits@~2.0.1:
inherits@2, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
Expand Down Expand Up @@ -841,6 +851,11 @@ isarray@0.0.1:
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==

isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==

isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
Expand All @@ -863,6 +878,16 @@ json-stable-stringify-without-jsonify@^1.0.1:
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==

jszip@^3.7.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.10.1.tgz#34aee70eb18ea1faec2f589208a157d1feb091c2"
integrity sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==
dependencies:
lie "~3.3.0"
pako "~1.0.2"
readable-stream "~2.3.6"
setimmediate "^1.0.5"

levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
Expand All @@ -871,6 +896,13 @@ levn@^0.4.1:
prelude-ls "^1.2.1"
type-check "~0.4.0"

lie@~3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a"
integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==
dependencies:
immediate "~3.0.5"

locate-path@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286"
Expand Down Expand Up @@ -970,6 +1002,11 @@ p-locate@^5.0.0:
dependencies:
p-limit "^3.0.2"

pako@~1.0.2:
version "1.0.11"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==

parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
Expand Down Expand Up @@ -1017,6 +1054,14 @@ playwright-core@1.40.1:
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.40.1.tgz#442d15e86866a87d90d07af528e0afabe4c75c05"
integrity sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==

playwright-merge-html-reports@^0.2.8:
version "0.2.8"
resolved "https://registry.yarnpkg.com/playwright-merge-html-reports/-/playwright-merge-html-reports-0.2.8.tgz#9ac4892314bdf1bac5cc79c4b02257f9acdca881"
integrity sha512-uiu198+KYq5DeVPso8JIsi8cY7BPpUkCQx8XpCgIBu92k3AY7BNl3vjgq5g1mOp40VcRccun0gd6uykQAlaiWQ==
dependencies:
jszip "^3.7.1"
yazl "^2.5.1"

playwright@1.40.1:
version "1.40.1"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.40.1.tgz#a11bf8dca15be5a194851dbbf3df235b9f53d7ae"
Expand All @@ -1031,6 +1076,11 @@ prelude-ls@^1.2.1:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==

process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==

progress@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
Expand Down Expand Up @@ -1065,6 +1115,19 @@ readable-stream@^3.0.2:
string_decoder "^1.1.1"
util-deprecate "^1.0.1"

readable-stream@~2.3.6:
version "2.3.8"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b"
integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.3"
isarray "~1.0.0"
process-nextick-args "~2.0.0"
safe-buffer "~5.1.1"
string_decoder "~1.1.1"
util-deprecate "~1.0.1"

rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
Expand Down Expand Up @@ -1115,6 +1178,11 @@ run-parallel@^1.1.9:
dependencies:
queue-microtask "^1.2.2"

safe-buffer@~5.1.0, safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==

safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
Expand All @@ -1134,6 +1202,11 @@ semver@^7.5.4:
dependencies:
lru-cache "^6.0.0"

setimmediate@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==

shebang-command@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea"
Expand Down Expand Up @@ -1177,6 +1250,13 @@ string_decoder@~0.10.x:
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==

string_decoder@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
dependencies:
safe-buffer "~5.1.0"

strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
Expand Down Expand Up @@ -1286,7 +1366,7 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"

util-deprecate@^1.0.1:
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
Expand Down Expand Up @@ -1318,6 +1398,13 @@ yallist@^4.0.0:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==

yazl@^2.5.1:
version "2.5.1"
resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.5.1.tgz#a3d65d3dd659a5b0937850e8609f22fffa2b5c35"
integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==
dependencies:
buffer-crc32 "~0.2.3"

yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
Expand Down

0 comments on commit 2f6aa7d

Please sign in to comment.