Skip to content

Commit 048e8a6

Browse files
nextcloud-commandChartman123
authored andcommitted
ci(actions): Update workflow templates from organization template repository
Signed-off-by: GitHub <noreply@github.com> Signed-off-by: Christian Hartmann <chris-hartmann@gmx.de>
1 parent d3fe306 commit 048e8a6

3 files changed

Lines changed: 70 additions & 59 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ name: Playwright Tests
2929
on:
3030
pull_request:
3131
branches:
32-
- master
33-
- stable35
34-
- stable34
35-
- stable33
32+
- main
33+
- stable5.3
3634

3735
permissions:
3836
contents: read
@@ -127,61 +125,6 @@ jobs:
127125
path: blob-report
128126
retention-days: 1
129127

130-
merge-reports:
131-
# Merge reports after playwright-tests, even if some shards have failed
132-
if: ${{ !cancelled() }}
133-
needs: [playwright-tests]
134-
135-
runs-on: ubuntu-latest-low
136-
steps:
137-
- name: Restore context
138-
id: cache
139-
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
140-
with:
141-
key: playwright-context-${{ github.run_id }}
142-
path: ./
143-
144-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
145-
if: steps.cache.outputs.cache-hit != 'true'
146-
with:
147-
persist-credentials: false
148-
149-
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
150-
if: steps.cache.outputs.cache-hit != 'true'
151-
with:
152-
node-version: ${{ needs.playwright-tests.outputs.node-version }}
153-
154-
- name: Set up npm
155-
if: steps.cache.outputs.cache-hit != 'true'
156-
run: npm i -g 'npm@${{ needs.playwright-tests.outputs.package-manager-version }}'
157-
158-
- name: Install dependencies
159-
if: steps.cache.outputs.cache-hit != 'true'
160-
run: npm ci
161-
162-
- name: Download blob reports from GitHub Actions Artifacts
163-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
164-
with:
165-
path: all-blob-reports
166-
pattern: blob-report-*
167-
merge-multiple: true
168-
169-
- name: Merge into HTML Report
170-
run: npx playwright merge-reports --config tests/playwright/merge.config.ts --reporter html,github ./all-blob-reports
171-
172-
- name: Upload HTML report
173-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
174-
with:
175-
name: html-report--attempt-${{ github.run_attempt }}
176-
path: playwright-report
177-
retention-days: 7
178-
179-
- name: How to show the logs
180-
run: |
181-
echo 'To view the report:'
182-
echo ' 1. Extract the folder from the zip file'
183-
echo ' 2. run "npx playwright show-report name-of-my-extracted-playwright-report"'
184-
185128
summary:
186129
permissions:
187130
contents: none
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml
2+
index c218bffb..1e0028ab 100644
3+
--- a/.github/workflows/playwright.yml
4+
+++ b/.github/workflows/playwright.yml
5+
@@ -125,61 +125,6 @@ jobs:
6+
path: blob-report
7+
retention-days: 1
8+
9+
- merge-reports:
10+
- # Merge reports after playwright-tests, even if some shards have failed
11+
- if: ${{ !cancelled() }}
12+
- needs: [playwright-tests]
13+
-
14+
- runs-on: ubuntu-latest-low
15+
- steps:
16+
- - name: Restore context
17+
- id: cache
18+
- uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
19+
- with:
20+
- key: playwright-context-${{ github.run_id }}
21+
- path: ./
22+
-
23+
- - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
24+
- if: steps.cache.outputs.cache-hit != 'true'
25+
- with:
26+
- persist-credentials: false
27+
-
28+
- - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
29+
- if: steps.cache.outputs.cache-hit != 'true'
30+
- with:
31+
- node-version: ${{ needs.playwright-tests.outputs.node-version }}
32+
-
33+
- - name: Set up npm
34+
- if: steps.cache.outputs.cache-hit != 'true'
35+
- run: npm i -g 'npm@${{ needs.playwright-tests.outputs.package-manager-version }}'
36+
-
37+
- - name: Install dependencies
38+
- if: steps.cache.outputs.cache-hit != 'true'
39+
- run: npm ci
40+
-
41+
- - name: Download blob reports from GitHub Actions Artifacts
42+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
43+
- with:
44+
- path: all-blob-reports
45+
- pattern: blob-report-*
46+
- merge-multiple: true
47+
-
48+
- - name: Merge into HTML Report
49+
- run: npx playwright merge-reports --config tests/playwright/merge.config.ts --reporter html,github ./all-blob-reports
50+
-
51+
- - name: Upload HTML report
52+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
53+
- with:
54+
- name: html-report--attempt-${{ github.run_attempt }}
55+
- path: playwright-report
56+
- retention-days: 7
57+
-
58+
- - name: How to show the logs
59+
- run: |
60+
- echo 'To view the report:'
61+
- echo ' 1. Extract the folder from the zip file'
62+
- echo ' 2. run "npx playwright show-report name-of-my-extracted-playwright-report"'
63+
-
64+
summary:
65+
permissions:
66+
contents: none

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"format:fix": "prettier --write .",
2222
"lint": "eslint --ext .js,.vue src",
2323
"lint:fix": "eslint --ext .js,.vue src --fix",
24+
"playwright": "playwright test",
25+
"playwright:install-ci": "playwright install chromium --only-shell",
2426
"start:nextcloud": "node playwright/start-nextcloud-server.mjs",
2527
"stylelint": "stylelint css/*.css css/*.scss src/**/*.vue",
2628
"stylelint:fix": "stylelint css/*.css css/*.scss src/**/*.vue --fix"

0 commit comments

Comments
 (0)