-
Notifications
You must be signed in to change notification settings - Fork 110
121 lines (104 loc) · 3.5 KB
/
test.yml
File metadata and controls
121 lines (104 loc) · 3.5 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: 'Test'
on:
workflow_call:
inputs:
reportCoverage:
default: true
type: boolean
required: false
jobs:
playwright:
name: Playwright
runs-on: ubuntu-latest
strategy:
matrix:
react: ['18', '19']
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install
run: yarn install --immutable
- name: Install React 18
if: ${{ matrix.react == '18' }}
run: |
yarn add "@types/react@18" "@types/react-dom@18" --dev
yarn add react@18 react-dom@18
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-${{ matrix.react }}
path: packages
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: yarn test:pw:ci
- uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
if: ${{ inputs.reportCoverage && matrix.react == '19' }}
with:
file: temp/playwright-coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: playwright
cypress:
name: Cypress
runs-on: ubuntu-latest
strategy:
matrix:
spec:
- base
- charts
- cypress-commands
- main/src/components
- main/src/webComponents
- main/src/internal
- compat
react: ['18', '19']
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install
run: yarn install --immutable
- name: Install 18
if: ${{ matrix.react == '18' }}
run: |
yarn add "@types/react@18" "@types/react-dom@18" --dev
yarn add react@18 react-dom@18
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: build-${{ matrix.react }}
path: packages
- name: Cypress run
uses: cypress-io/github-action@4c06c48f3ffea349b7189aa06dfcda47a9fa7b92 # v7.1.8
with:
browser: chrome
component: true
spec: packages/${{ matrix.spec }}
install: false
- uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
if: ${{ inputs.reportCoverage && matrix.react == '19' }}
with:
file: temp/cypress-coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
flag-name: ${{ matrix.spec }}
coveralls:
if: ${{ always() && inputs.reportCoverage }}
needs: ['cypress', 'playwright']
name: 'Combine Coverage'
runs-on: ubuntu-latest
steps:
- name: Coveralls
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: 'base,charts,cypress-commands,main/src/components,main/src/internal,playwright'