-
Notifications
You must be signed in to change notification settings - Fork 55
67 lines (58 loc) · 2.13 KB
/
design-system-component-testing.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
name: Design System component testing
on:
push:
paths:
- ".github/workflows/design-system-*"
- "packages/design-tokens/**"
- "packages/design-system/**"
permissions:
contents: read
deployments: read
pull-requests: write
statuses: write
jobs:
cypress-run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: ["chrome", "firefox"]
steps:
- name: Checkout repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: 18
registry-url: "https://registry.npmjs.org/"
scope: "@talend"
cache: "yarn"
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 #v3.3.1
with:
path: ~/.cache/Cypress
key: my-cache-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- name: Install dependencies
run: |
yarn --frozen-lock --ignore-scripts
yarn cypress install
yarn workspace @talend/assets-api run build:lib
yarn workspace @talend/utils run build:lib
yarn workspace @talend/icons run build:lib
yarn workspace @talend/design-tokens run build:lib
- name: Cypress Component Testing
uses: cypress-io/github-action@d69252d52b9a31bad4f418f05ba2bc83687a02eb #v5.8.3
with:
install: false
browser: ${{ matrix.browser }}
command: yarn workspace @talend/design-system run test:cy
- name: Cypress screenshots upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #v3.1.2
if: failure()
with:
name: cypress-component-testing-${{ matrix.browser }}-screenshots
path: packages/design-system/cypress/screenshots/**/*
- name: Cypress videos upload
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #v3.1.2
if: failure()
with:
name: cypress-component-testing-${{ matrix.browser }}-videos
path: packages/design-system/cypress/videos/**/*