-
Notifications
You must be signed in to change notification settings - Fork 2
113 lines (91 loc) · 2.49 KB
/
ci.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
102
103
104
105
106
107
108
109
110
111
112
113
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
pack:
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7
- uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
cache: "pnpm"
- run: pnpm i --frozen-lockfile
- run: pnpm build
- run: pnpm pub:dry-run
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
test:
strategy:
fail-fast: false
matrix:
browser: [chrome, webkit, edge, electron, firefox]
runs-on: ubuntu-24.04
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
- name: Cache cypress
id: cache-cypress
uses: actions/cache@v3
env:
cache-name: cache-cypress-binary
with:
path: |
~/.local/share/pnpm/store
~/.cache
key: ${{ runner.os }}-cypress-${{ env.cache-name }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-cypress-${{ env.cache-name }}-
${{ runner.os }}-cypress-
${{ runner.os }}-
- uses: pnpm/action-setup@v4
name: Install pnpm
id: pnpm-install
with:
version: 7
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Lint packages
run: pnpm lint
- name: Install playwright with webkit
uses: cypress-io/github-action@v4
if: ${{ matrix.browser == 'webkit' }}
with:
build: pnpx playwright@1.28.0 install-deps webkit
runTests: false
- name: Run Component tests 🧪
uses: cypress-io/github-action@v4
with:
component: true
browser: ${{ matrix.browser }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos