-
Notifications
You must be signed in to change notification settings - Fork 113
77 lines (68 loc) · 1.95 KB
/
test.yml
File metadata and controls
77 lines (68 loc) · 1.95 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
name: 'Test'
on:
workflow_call:
inputs:
reportCoverage:
default: true
type: boolean
required: false
jobs:
cypress:
name: Cypress
runs-on: ubuntu-latest
strategy:
matrix:
spec:
- base
- charts
- cypress-commands
- main/src/components
- main/src/internal
- compat
react: ['18', '19']
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4.2.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
- name: Cypress run
uses: cypress-io/github-action@v6
with:
browser: chrome
component: true
spec: packages/${{ matrix.spec }}
install: false
- uses: actions/github-script@v7
id: transform-path
with:
script: return "${{ matrix.spec }}".replaceAll("/", "-")
result-encoding: string
- uses: coverallsapp/github-action@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: ${{ steps.transform-path.outputs.result }}
coveralls:
if: ${{ always() && inputs.reportCoverage }}
needs: ['cypress']
name: 'Combine Coverage'
runs-on: ubuntu-latest
steps:
- name: Coveralls
uses: coverallsapp/github-action@v2.3.6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: 'base,charts,cypress-commands,main-src-components,main-src-internal,compat'