-
Notifications
You must be signed in to change notification settings - Fork 10
101 lines (87 loc) · 2.92 KB
/
02-e2e-showcases.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: 🎭 Playwright E2E
on:
workflow_call:
inputs:
version:
required: true
type: string
showcase:
required: true
type: string
path:
required: false
type: string
permissions:
actions: write
contents: write
jobs:
playwright-showcases:
name: 🧪🎭 - ${{ inputs.showcase }}:${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v${{ inputs.version }}
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4, 5, 6]
shardTotal: [6]
steps:
- name: ⏬ Checkout repo
uses: actions/checkout@v4
- name: 🔄 Init Cache
uses: ./.github/actions/npm-cache
- name: 📲 Install esbuild (binary workaround)
run: npm i -D esbuild-linux-64
- name: ⏬ Download foundations build
uses: actions/download-artifact@v4
with:
name: db-ui-foundations-build
path: packages/foundations/build
- name: ⏬ Download output
uses: actions/download-artifact@v4
with:
name: db-ui-output
path: output
- name: ⏬ Download components styles build
uses: actions/download-artifact@v4
with:
name: db-ui-components-build
path: packages/components/build
- name: ⏬ Download ${{ inputs.showcase }}
uses: actions/download-artifact@v4
with:
name: db-ui-${{ inputs.showcase }}
path: build-showcases/${{ inputs.showcase }}
- name: 🧴 Copy patternhub testing app
if: inputs.path
shell: bash
run: |
mkdir -p ./build-showcases${{ inputs.path }}
cp -RT ./build-showcases/${{ inputs.showcase }} ./build-showcases${{ inputs.path }}
- name: 👩🔬 Test showcase with Playwright 🎭
shell: bash
env:
HOME: /root
NEXT_PUBLIC_BASE_PATH: ${{ inputs.path }}
run: |
ls ./build-showcases${{ inputs.path }}
npm run test:e2e --workspace=${{ inputs.showcase }} -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
- name: 🔣 Print GitHub Report
if: failure()
shell: bash
run: |
npx playwright merge-reports --reporter github ./blob-report
- name: 🆙 Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.showcase }}-playwright-results-${{ matrix.shardIndex }}
path: ./showcases/${{ inputs.showcase }}/test-results
retention-days: 30
- name: 🆙 Upload aChecker results
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.showcase }}-showcase-achecker-results-${{ matrix.shardIndex }}
path: ./showcases/${{ inputs.showcase }}-showcase/results
retention-days: 30