From b2111adef5b9bd7f9a1f306883cc4dca6d5cc5d7 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:02:12 +0530 Subject: [PATCH 01/15] Feat: Calculate package size change on PRs --- .github/workflows/e2e.yml | 45 +++++++++++++++++++++++++++++-- package.json | 1 + pnpm-lock.yaml | 3 +++ scripts/size.ts | 57 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 scripts/size.ts diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index b8232b8c0e..85a33e00c5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,6 +15,7 @@ on: permissions: contents: read + pull-requests: write env: # For PRs and MergeQueues, the target commit is used, and for push events, github.event.previous is used. @@ -45,11 +46,26 @@ jobs: with: ref: ${{ env.targetHash }} + - name: Install dependencies + if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} + uses: cypress-io/github-action@v6 + with: + # just perform install + runTests: false + + - name: Build + if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' && github.event_name == 'pull_request' }} + run: | + pnpm run build:viz + mkdir -p cypress/snapshots/stats/base + mv stats cypress/snapshots/stats/base + - name: Cypress run - uses: cypress-io/github-action@v4 + uses: cypress-io/github-action@v6 id: cypress-snapshot-gen if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} with: + install: false start: pnpm run dev wait-on: 'http://localhost:9000' browser: chrome @@ -81,15 +97,27 @@ jobs: path: ./cypress/snapshots key: ${{ runner.os }}-snapshots-${{ env.targetHash }} + - name: Install dependencies + uses: cypress-io/github-action@v6 + with: + runTests: false + + - name: Build + if: ${{ github.event_name == 'pull_request' }} + run: | + pnpm run build:viz + mv stats cypress/snapshots/stats/head + # Install NPM dependencies, cache them correctly # and run all Cypress tests - name: Cypress run - uses: cypress-io/github-action@v4 + uses: cypress-io/github-action@v6 id: cypress # If CYPRESS_RECORD_KEY is set, run in parallel on all containers # Otherwise (e.g. if running from fork), we run on a single container only if: ${{ ( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 ) }} with: + install: false start: pnpm run dev:coverage wait-on: 'http://localhost:9000' browser: chrome @@ -136,6 +164,19 @@ jobs: pattern: snapshots-* merge-multiple: true + - name: Calculate Size difference + id: size + if: ${{ github.event_name == 'pull_request' }} + run: echo "::set-output name=size_diff::$(npx tsx scripts/size.ts)" + + - name: Comment PR size difference + if: ${{ github.event_name == 'pull_request' }} + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ steps.size.outputs.size_diff }} + comment_tag: size-diff + # For successful push events, we save the snapshots cache - name: Save snapshots cache id: cache-upload diff --git a/package.json b/package.json index ed0ae63a50..d923eb8595 100644 --- a/package.json +++ b/package.json @@ -110,6 +110,7 @@ "jsdom": "^22.0.0", "langium-cli": "2.0.1", "lint-staged": "^13.2.1", + "markdown-table": "^3.0.3", "nyc": "^15.1.0", "path-browserify": "^1.0.1", "pnpm": "^8.6.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31273ff6de..3a30a62a8c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -155,6 +155,9 @@ importers: lint-staged: specifier: ^13.2.1 version: 13.2.3 + markdown-table: + specifier: ^3.0.3 + version: 3.0.3 nyc: specifier: ^15.1.0 version: 15.1.0 diff --git a/scripts/size.ts b/scripts/size.ts new file mode 100644 index 0000000000..c6d3491e35 --- /dev/null +++ b/scripts/size.ts @@ -0,0 +1,57 @@ +/* eslint-disable no-console */ +import type { Metafile } from 'esbuild'; +import { readFile } from 'fs/promises'; +import { globby } from 'globby'; +import { markdownTable } from 'markdown-table'; +export const getSizes = (metafile: Metafile) => { + const { outputs } = metafile; + const sizes = Object.keys(outputs) + .filter((key) => key.endsWith('js') && !key.includes('chunk')) + .map((key) => { + const { bytes } = outputs[key]; + return [key.replace('dist/', ''), bytes]; + }); + return sizes; +}; + +const readStats = async (path: string): Promise> => { + const files = await globby(path); + const contents = await Promise.all(files.map((file) => readFile(file, 'utf-8'))); + const sizes = contents.flatMap((content) => getSizes(JSON.parse(content))); + return Object.fromEntries(sizes); +}; + +const percentageDifference = (oldValue: number, newValue: number): string => { + const difference = Math.abs(newValue - oldValue); + const avg = (newValue + oldValue) / 2; + const percentage = (difference / avg) * 100; + const roundedPercentage = percentage.toFixed(2); // Round to two decimal places + if (roundedPercentage === '0.00') { + return '0.00%'; + } + const sign = newValue > oldValue ? '+' : '-'; + return `${sign}${roundedPercentage}%`; +}; + +const main = async () => { + const oldStats = await readStats('./cypress/snapshots/base/*.json'); + const newStats = await readStats('./cypress/snapshots/head/*.json'); + const diff = Object.entries(newStats) + .map(([key, value]) => { + const oldValue = oldStats[key]; + const delta = value - oldValue; + return [key, oldValue, value, delta, percentageDifference(oldValue, value)].map((v) => + v.toString() + ); + }) + .filter(([, , , delta]) => delta !== '0'); + if (diff.length === 0) { + console.log('No changes in bundle sizes'); + return; + } + console.log( + markdownTable([['File', 'Previous Size', 'New Size', 'Difference', '% Change'], ...diff]) + ); +}; + +void main().catch((e) => console.error(e)); From 0f02f5ff345a3dea3804e7b2585cd2436d199269 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:04:57 +0530 Subject: [PATCH 02/15] Skip running tests --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 85a33e00c5..cf2d872aa7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -63,7 +63,7 @@ jobs: - name: Cypress run uses: cypress-io/github-action@v6 id: cypress-snapshot-gen - if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} + if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' && false }} with: install: false start: pnpm run dev @@ -115,7 +115,7 @@ jobs: id: cypress # If CYPRESS_RECORD_KEY is set, run in parallel on all containers # Otherwise (e.g. if running from fork), we run on a single container only - if: ${{ ( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 ) }} + if: ${{ false && (( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 )) }} with: install: false start: pnpm run dev:coverage From e0448a7b7be4fcad775f9dd0292f49845c84836c Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:12:16 +0530 Subject: [PATCH 03/15] Feat: Calculate package size change on PRs --- .github/workflows/e2e.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index cf2d872aa7..84eff7c517 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -103,10 +103,21 @@ jobs: runTests: false - name: Build - if: ${{ github.event_name == 'pull_request' }} + id: size + if: ${{ github.event_name == 'pull_request' && matrix.containers == 1 }} run: | pnpm run build:viz mv stats cypress/snapshots/stats/head + echo "size_diff=$(npx tsx scripts/size.ts)" >> $GITHUB_OUTPUT + + # Size diff only needs to be posted from one job, on PRs. + - name: Comment PR size difference + if: ${{ github.event_name == 'pull_request' && matrix.containers == 1 }} + uses: thollander/actions-comment-pull-request@v2 + with: + message: | + ${{ steps.size.outputs.size_diff }} + comment_tag: size-diff # Install NPM dependencies, cache them correctly # and run all Cypress tests @@ -164,19 +175,6 @@ jobs: pattern: snapshots-* merge-multiple: true - - name: Calculate Size difference - id: size - if: ${{ github.event_name == 'pull_request' }} - run: echo "::set-output name=size_diff::$(npx tsx scripts/size.ts)" - - - name: Comment PR size difference - if: ${{ github.event_name == 'pull_request' }} - uses: thollander/actions-comment-pull-request@v2 - with: - message: | - ${{ steps.size.outputs.size_diff }} - comment_tag: size-diff - # For successful push events, we save the snapshots cache - name: Save snapshots cache id: cache-upload From edc091f4d40c82983a07d059af17b91d45ef5138 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:16:10 +0530 Subject: [PATCH 04/15] Test --- packages/mermaid/src/mermaid.ts | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/packages/mermaid/src/mermaid.ts b/packages/mermaid/src/mermaid.ts index 8194872d44..e80389ad90 100644 --- a/packages/mermaid/src/mermaid.ts +++ b/packages/mermaid/src/mermaid.ts @@ -311,6 +311,42 @@ const executeQueue = async () => { executionQueueRunning = false; }; +// eslint-disable-next-line no-console +console.log(`This should increase size +export interface Mermaid { + startOnLoad: boolean; + parseError?: ParseErrorFunction; + mermaidAPI: typeof mermaidAPI; + parse: typeof parse; + render: typeof render; + init: typeof init; + run: typeof run; + registerExternalDiagrams: typeof registerExternalDiagrams; + initialize: typeof initialize; + contentLoaded: typeof contentLoaded; + setParseErrorHandler: typeof setParseErrorHandler; + detectType: typeof detectType; +} + +const mermaid: Mermaid = { + startOnLoad: true, + mermaidAPI, + parse, + render, + init, + run, + registerExternalDiagrams, + initialize, + parseError: undefined, + contentLoaded, + setParseErrorHandler, + detectType, +}; + +export default mermaid; + +`); + /** * Parse the text and validate the syntax. * @param text - The mermaid diagram definition. From 50cdb74d5454881ea87441dd60a7d7b8d2c1b423 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:25:05 +0530 Subject: [PATCH 05/15] Fix file path --- scripts/size.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/size.ts b/scripts/size.ts index c6d3491e35..00a0318dd8 100644 --- a/scripts/size.ts +++ b/scripts/size.ts @@ -34,8 +34,8 @@ const percentageDifference = (oldValue: number, newValue: number): string => { }; const main = async () => { - const oldStats = await readStats('./cypress/snapshots/base/*.json'); - const newStats = await readStats('./cypress/snapshots/head/*.json'); + const oldStats = await readStats('./cypress/snapshots/stats/base/*.json'); + const newStats = await readStats('./cypress/snapshots/stats/head/*.json'); const diff = Object.entries(newStats) .map(([key, value]) => { const oldValue = oldStats[key]; From e07608209b682cc13cbf3b722b6f85cb31fa2783 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:28:49 +0530 Subject: [PATCH 06/15] debug --- scripts/size.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/size.ts b/scripts/size.ts index 00a0318dd8..2788c7abb1 100644 --- a/scripts/size.ts +++ b/scripts/size.ts @@ -16,6 +16,7 @@ export const getSizes = (metafile: Metafile) => { const readStats = async (path: string): Promise> => { const files = await globby(path); + console.log(path, files); const contents = await Promise.all(files.map((file) => readFile(file, 'utf-8'))); const sizes = contents.flatMap((content) => getSizes(JSON.parse(content))); return Object.fromEntries(sizes); @@ -36,6 +37,7 @@ const percentageDifference = (oldValue: number, newValue: number): string => { const main = async () => { const oldStats = await readStats('./cypress/snapshots/stats/base/*.json'); const newStats = await readStats('./cypress/snapshots/stats/head/*.json'); + console.log(oldStats, newStats); const diff = Object.entries(newStats) .map(([key, value]) => { const oldValue = oldStats[key]; From 8d1d691bc3f6108fa91fc952ed9f7953125887d6 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:38:59 +0530 Subject: [PATCH 07/15] debug --- .github/workflows/e2e.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 84eff7c517..24a0fbb736 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -108,6 +108,8 @@ jobs: run: | pnpm run build:viz mv stats cypress/snapshots/stats/head + ls -l cypress/snapshots/stats/base + ls -l cypress/snapshots/stats/head echo "size_diff=$(npx tsx scripts/size.ts)" >> $GITHUB_OUTPUT # Size diff only needs to be posted from one job, on PRs. From 96a3991c565bbc5eac65c5a04be889e6101ce3ce Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:42:31 +0530 Subject: [PATCH 08/15] Update glob --- scripts/size.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/size.ts b/scripts/size.ts index 2788c7abb1..1e21dd3baf 100644 --- a/scripts/size.ts +++ b/scripts/size.ts @@ -35,8 +35,8 @@ const percentageDifference = (oldValue: number, newValue: number): string => { }; const main = async () => { - const oldStats = await readStats('./cypress/snapshots/stats/base/*.json'); - const newStats = await readStats('./cypress/snapshots/stats/head/*.json'); + const oldStats = await readStats('./cypress/snapshots/stats/base/**/*.json'); + const newStats = await readStats('./cypress/snapshots/stats/head/**/*.json'); console.log(oldStats, newStats); const diff = Object.entries(newStats) .map(([key, value]) => { From e008b7dae7c94575cc4133e25a62fcaa1f40a24d Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:45:30 +0530 Subject: [PATCH 09/15] Remove logs --- scripts/size.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/size.ts b/scripts/size.ts index 1e21dd3baf..c2d753f633 100644 --- a/scripts/size.ts +++ b/scripts/size.ts @@ -16,7 +16,6 @@ export const getSizes = (metafile: Metafile) => { const readStats = async (path: string): Promise> => { const files = await globby(path); - console.log(path, files); const contents = await Promise.all(files.map((file) => readFile(file, 'utf-8'))); const sizes = contents.flatMap((content) => getSizes(JSON.parse(content))); return Object.fromEntries(sizes); @@ -37,7 +36,6 @@ const percentageDifference = (oldValue: number, newValue: number): string => { const main = async () => { const oldStats = await readStats('./cypress/snapshots/stats/base/**/*.json'); const newStats = await readStats('./cypress/snapshots/stats/head/**/*.json'); - console.log(oldStats, newStats); const diff = Object.entries(newStats) .map(([key, value]) => { const oldValue = oldStats[key]; From 6d4b27aacb6cc3abd08b9e7b255fd79f62a35e50 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:51:15 +0530 Subject: [PATCH 10/15] Fix out format --- .github/workflows/e2e.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 24a0fbb736..2f30dbc56d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -110,7 +110,11 @@ jobs: mv stats cypress/snapshots/stats/head ls -l cypress/snapshots/stats/base ls -l cypress/snapshots/stats/head - echo "size_diff=$(npx tsx scripts/size.ts)" >> $GITHUB_OUTPUT + { + echo 'size_diff<> "$GITHUB_OUTPUT" # Size diff only needs to be posted from one job, on PRs. - name: Comment PR size difference From bea76aa682dee77ed611b14a1cd116bd01bd741e Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 21:59:58 +0530 Subject: [PATCH 11/15] Format Size --- .github/workflows/e2e.yml | 2 -- scripts/size.ts | 29 ++++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2f30dbc56d..97f171a830 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -108,8 +108,6 @@ jobs: run: | pnpm run build:viz mv stats cypress/snapshots/stats/head - ls -l cypress/snapshots/stats/base - ls -l cypress/snapshots/stats/head { echo 'size_diff<> => { return Object.fromEntries(sizes); }; +const formatBytes = (bytes: number): string => { + if (bytes == 0) { + return '0 Bytes'; + } + const base = 1024; + const decimals = 2; + const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + const i = Math.floor(Math.log(bytes) / Math.log(base)); + return parseFloat((bytes / Math.pow(base, i)).toFixed(decimals)) + ' ' + sizes[i]; +}; + +const formatSize = (bytes: number): string => { + const formatted = formatBytes(bytes); + if (formatted.includes('Bytes')) { + return formatted; + } + return `${formatBytes(bytes)} (${bytes} Bytes)`; +}; + const percentageDifference = (oldValue: number, newValue: number): string => { const difference = Math.abs(newValue - oldValue); const avg = (newValue + oldValue) / 2; @@ -40,9 +59,13 @@ const main = async () => { .map(([key, value]) => { const oldValue = oldStats[key]; const delta = value - oldValue; - return [key, oldValue, value, delta, percentageDifference(oldValue, value)].map((v) => - v.toString() - ); + return [ + key, + formatSize(oldValue), + formatSize(value), + formatSize(delta), + percentageDifference(oldValue, value), + ].map((v) => v.toString()); }) .filter(([, , , delta]) => delta !== '0'); if (diff.length === 0) { From f354d683501018078ee7eb427146389276aee9db Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 22:12:33 +0530 Subject: [PATCH 12/15] Format message --- scripts/size.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/size.ts b/scripts/size.ts index 4e680268be..08e5fd1a74 100644 --- a/scripts/size.ts +++ b/scripts/size.ts @@ -56,18 +56,21 @@ const main = async () => { const oldStats = await readStats('./cypress/snapshots/stats/base/**/*.json'); const newStats = await readStats('./cypress/snapshots/stats/head/**/*.json'); const diff = Object.entries(newStats) + .filter(([, value]) => value > 2048) .map(([key, value]) => { const oldValue = oldStats[key]; const delta = value - oldValue; - return [ + const output = [ key, formatSize(oldValue), formatSize(value), formatSize(delta), percentageDifference(oldValue, value), - ].map((v) => v.toString()); + ]; + console.log(output); + return output; }) - .filter(([, , , delta]) => delta !== '0'); + .filter(([, , , delta]) => delta !== '0 Bytes'); if (diff.length === 0) { console.log('No changes in bundle sizes'); return; From f6c4c9260ff3823a90b20535b757eb7f69339482 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 22:13:17 +0530 Subject: [PATCH 13/15] Remove log --- scripts/size.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/size.ts b/scripts/size.ts index 08e5fd1a74..2190fd9ef2 100644 --- a/scripts/size.ts +++ b/scripts/size.ts @@ -67,7 +67,6 @@ const main = async () => { formatSize(delta), percentageDifference(oldValue, value), ]; - console.log(output); return output; }) .filter(([, , , delta]) => delta !== '0 Bytes'); From 1d2450245e76eed31c5650cbd647ad5871655f50 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 22:16:21 +0530 Subject: [PATCH 14/15] Remove dummy change --- packages/mermaid/src/mermaid.ts | 36 --------------------------------- 1 file changed, 36 deletions(-) diff --git a/packages/mermaid/src/mermaid.ts b/packages/mermaid/src/mermaid.ts index e80389ad90..8194872d44 100644 --- a/packages/mermaid/src/mermaid.ts +++ b/packages/mermaid/src/mermaid.ts @@ -311,42 +311,6 @@ const executeQueue = async () => { executionQueueRunning = false; }; -// eslint-disable-next-line no-console -console.log(`This should increase size -export interface Mermaid { - startOnLoad: boolean; - parseError?: ParseErrorFunction; - mermaidAPI: typeof mermaidAPI; - parse: typeof parse; - render: typeof render; - init: typeof init; - run: typeof run; - registerExternalDiagrams: typeof registerExternalDiagrams; - initialize: typeof initialize; - contentLoaded: typeof contentLoaded; - setParseErrorHandler: typeof setParseErrorHandler; - detectType: typeof detectType; -} - -const mermaid: Mermaid = { - startOnLoad: true, - mermaidAPI, - parse, - render, - init, - run, - registerExternalDiagrams, - initialize, - parseError: undefined, - contentLoaded, - setParseErrorHandler, - detectType, -}; - -export default mermaid; - -`); - /** * Parse the text and validate the syntax. * @param text - The mermaid diagram definition. From 3ecb841c1add368427303ce6cb9f8b3c96d4819e Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Wed, 24 Jan 2024 22:17:10 +0530 Subject: [PATCH 15/15] Remove dummy change from e2e.yml --- .github/workflows/e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 97f171a830..e9a4966b40 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -63,7 +63,7 @@ jobs: - name: Cypress run uses: cypress-io/github-action@v6 id: cypress-snapshot-gen - if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' && false }} + if: ${{ steps.cache-snapshot.outputs.cache-hit != 'true' }} with: install: false start: pnpm run dev @@ -130,7 +130,7 @@ jobs: id: cypress # If CYPRESS_RECORD_KEY is set, run in parallel on all containers # Otherwise (e.g. if running from fork), we run on a single container only - if: ${{ false && (( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 )) }} + if: ${{ ( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 ) }} with: install: false start: pnpm run dev:coverage