-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (53 loc) · 1.62 KB
/
ci-validate-snapshots.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
name: Validate Snapshots
on:
push:
branches:
- main
- gh-pages
- 'features/**'
pull_request:
branches:
- main
- gh-pages
- 'features/**'
jobs:
validate-snapshots:
runs-on: macos-latest
strategy:
matrix:
node: [16.x]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache multiple paths
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install Dependencies
run: npm ci
- name: Build package files
run: npm run build --workspace=design-to-code --workspace=design-to-code-react
- name: Build test app
run: npm run build:app --workspace=design-to-code --workspace=design-to-code-react
- name: Install playwright browsers
run: npx playwright install
- name: Test design to code package
run: npm run test:snapshots --workspace=design-to-code
- name: Test design to code react package
run: npm run test:snapshots --workspace=design-to-code-react
- name: Build docs site
run: npm run build:gh-pages