-
Notifications
You must be signed in to change notification settings - Fork 27
82 lines (79 loc) · 2.56 KB
/
test-ui.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
name: "Test"
on:
workflow_dispatch:
pull_request:
jobs:
vitest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: cd ./vuu-ui && npm install
- run: cd ./vuu-ui && npm run test:vite
cypress-e2e:
# As a third party action, cypress-io is pinned to a full length commit SHA for security purposes.
# This is also a requirement for the semgrep (static code analysis) scan to pass.
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: cd ./vuu-ui && npm install
- name: Run end-to-end tests in Chrome
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
install: false
working-directory: ./vuu-ui
browser: chrome
build: npm run build
start: npm run showcase
wait-on: "http://localhost:5173"
- name: Run end-to-end tests in Edge
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
install: false
working-directory: ./vuu-ui
browser: edge
build: npm run build
start: npm run showcase
wait-on: "http://localhost:5173"
# ensure the vuu example and showcase still build
vuu-and-showcase-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install dependencies
run: cd ./vuu-ui && npm install
- name: Build Vuu Libraries
run: cd ./vuu-ui && npm run build
- name: Build showcase
run: cd ./vuu-ui && npm run showcase:build
- name: Build Vuu app
run: cd ./vuu-ui && npm run build:app