-
Notifications
You must be signed in to change notification settings - Fork 37
119 lines (113 loc) · 4.03 KB
/
test-ui.yml
File metadata and controls
119 lines (113 loc) · 4.03 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
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
114
115
116
117
118
119
name: "Test UI"
on:
workflow_dispatch:
pull_request:
jobs:
lint-and-typecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- run: cd ./vuu-ui && npm run build:worker
- run: cd ./vuu-ui && npm run lint
- run: cd ./vuu-ui && npm run typecheck
vitest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- run: cd ./vuu-ui && npm run test:vite
# playwright:
# timeout-minutes: 10
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Install Node & dependencies
# uses: ./.github/actions/setup-vuu-ui
# - name: Install Playwright Chromium Browser
# run: cd ./vuu-ui && npx playwright install --with-deps chromium
# - name: Build Showcase
# run: cd ./vuu-ui && npm run showcase:build
# - name: Run tests
# run: |
# cd ./vuu-ui &&
# npm run test:playwright
# - uses: actions/upload-artifact@v4
# if: ${{ !cancelled() }}
# with:
# name: playwright-report
# path: ./vuu-ui/playwright/reports/
# retention-days: 10
cypress-component:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- name: Build Worker
run: cd ./vuu-ui && npm run build:worker
- name: Run component tests in Chrome
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
component: true
install: false
working-directory: ./vuu-ui
browser: chrome
- name: Run component tests in Edge
uses: cypress-io/github-action@bd9dda317ed2d4fbffc808ba6cdcd27823b2a13b
with:
component: true
install: false
working-directory: ./vuu-ui
browser: edge
playwright-component:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- name: Install Playwright Browsers
run: cd ./vuu-ui && npx playwright install --with-deps chromium firefox webkit
- name: Run Playwright component tests
run: cd ./vuu-ui && npm run test:playwright:ct
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: vuu-ui/playwright-report/
retention-days: 10
- name: Add Playwright Results to Summary
if: always()
run: |
echo "## 🎭 Playwright Component Tests" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ -f "vuu-ui/playwright-report/index.html" ]; then
echo "✅ **Tests completed successfully**" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📊 **Report available**: Download the 'playwright-report' artifact to view detailed results" >> $GITHUB_STEP_SUMMARY
else
echo "❌ **Tests failed or report not generated**" >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "🔍 **Test Location**: \`packages/vuu-ui-controls/src/__tests__/__component__/\`" >> $GITHUB_STEP_SUMMARY
echo "📝 **Test Pattern**: \`*.playwright.test.tsx\`" >> $GITHUB_STEP_SUMMARY
# ensure the vuu example still builds
vuu-app-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node & dependencies
uses: ./.github/actions/setup-vuu-ui
- name: Build Vuu Libraries
run: cd ./vuu-ui && npm run build
- name: Build Vuu app
run: cd ./vuu-ui && npm run build:app