Skip to content

Commit 49bc8cb

Browse files
authored
Merge pull request #8663 from nextcloud/backport/8656/stable33
[stable33] test(playwright): add summary job so we can add it to merge rules
2 parents 1f87a2b + d54e717 commit 49bc8cb

3 files changed

Lines changed: 42 additions & 32 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,57 +11,67 @@ permissions:
1111
contents: read
1212

1313
jobs:
14-
test:
14+
playwright:
1515
timeout-minutes: 60
1616
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
shardIndex: [1, 2, 3]
20+
shardTotal: [3]
1721
steps:
1822
- name: Checkout app
19-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
23+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2024
with:
2125
persist-credentials: false
2226

2327
- name: Check composer.json
2428
id: check_composer
25-
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
29+
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
2630
with:
2731
files: 'composer.json'
2832

2933
- name: Install composer dependencies
3034
if: steps.check_composer.outputs.files_exists == 'true'
3135
run: composer install --no-dev
3236

33-
- name: Read package.json node and npm engines version
34-
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
37+
- name: Read package.json
38+
uses: nextcloud-libraries/parse-package-engines-action@122ae05d4257008180a514e1ddeb0c1b9d094bdd # v0.1.0
3539
id: versions
36-
with:
37-
fallbackNode: '^20'
38-
fallbackNpm: '^10'
3940

40-
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
41-
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
41+
- name: Set up node
42+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
4243
with:
43-
node-version: ${{ steps.versions.outputs.nodeVersion }}
44+
node-version: ${{ steps.versions.outputs.node-version }}
4445

45-
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
46-
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
46+
- name: Set up npm
47+
run: npm i -g 'npm@${{ steps.versions.outputs.steps.versions.outputs.package-manager-version }}'
4748

4849
- name: Install node dependencies & build app
4950
env:
5051
CYPRESS_INSTALL_BINARY: 0
5152
run: |
5253
npm ci
53-
TESTING=true npm run build --if-present
54+
npm run build --if-present
5455
5556
- name: Install Playwright Browsers
5657
run: npx playwright install chromium --only-shell
5758

5859
- name: Run Playwright tests
59-
run: npx playwright test
60+
run: npx playwright test --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
6061

6162
- name: Upload results
62-
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
63-
if: always()
63+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
64+
if: ${{ !cancelled() }}
6465
with:
65-
name: playwright-report
66+
name: playwright-report_shard${{ matrix.shardIndex }}
6667
path: test-results/
67-
retention-days: 30
68+
retention-days: 7
69+
70+
summary:
71+
runs-on: ubuntu-latest-low
72+
needs: playwright
73+
if: always()
74+
name: playwright-summary
75+
steps:
76+
- name: Summary status
77+
run: if ${{ needs.playwright.result != 'success' && needs.playwright.result != 'skipped' }}; then exit 1; fi

package-lock.json

Lines changed: 12 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"@nextcloud/eslint-config": "^8.4.2",
113113
"@nextcloud/prettier-config": "^1.2.0",
114114
"@nextcloud/vite-config": "^1.7.2",
115-
"@playwright/test": "^1.57.0",
115+
"@playwright/test": "^1.60.0",
116116
"@types/markdown-it": "^14.1.2",
117117
"@vitejs/plugin-vue2": "^2.3.4",
118118
"@vitest/coverage-v8": "^4.0.18",

0 commit comments

Comments
 (0)