File tree Expand file tree Collapse file tree 1 file changed +81
-0
lines changed Expand file tree Collapse file tree 1 file changed +81
-0
lines changed Original file line number Diff line number Diff line change 1+ # vue-skuilder/.github/workflows/ci-pkg-common-ui.yml
2+ name : CI - Common UI Package
3+
4+ on :
5+ push :
6+ branches : [main]
7+ paths :
8+ - ' packages/common-ui/**'
9+ - ' packages/common/**'
10+ - ' packages/db/**'
11+ - ' .github/workflows/ci-pkg-common-ui.yml'
12+ pull_request :
13+ branches : [main]
14+ paths :
15+ - ' packages/common-ui/**'
16+ - ' packages/common/**'
17+ - ' packages/db/**'
18+ - ' .github/workflows/ci-pkg-common-ui.yml'
19+
20+ jobs :
21+ build-and-test :
22+ runs-on : ubuntu-latest
23+
24+ steps :
25+ - name : Checkout repository
26+ uses : actions/checkout@v4
27+
28+ - name : Set up Node.js
29+ uses : actions/setup-node@v4
30+ with :
31+ node-version : 18
32+ cache : ' yarn'
33+
34+ - name : Install dependencies
35+ run : yarn install --immutable
36+
37+ # Build dependencies first
38+ - name : Build common package
39+ run : |
40+ cd packages/common
41+ yarn build
42+
43+ - name : Build db package
44+ run : |
45+ cd packages/db
46+ yarn build
47+
48+ # Lint common-ui
49+ - name : Lint common-ui
50+ run : |
51+ cd packages/common-ui
52+ yarn lint:check
53+
54+ # Build common-ui
55+ - name : Build common-ui
56+ run : |
57+ cd packages/common-ui
58+ yarn build
59+
60+ # Run unit tests
61+ - name : Run unit tests
62+ run : |
63+ cd packages/common-ui
64+ yarn test:unit
65+
66+ # Run component tests
67+ - name : Run Cypress component tests
68+ run : |
69+ cd packages/common-ui
70+ yarn cypress:run --component
71+
72+ # Archive test artifacts if tests fail
73+ - name : Archive Cypress screenshots and videos
74+ uses : actions/upload-artifact@v4
75+ if : failure()
76+ with :
77+ name : cypress-artifacts
78+ path : |
79+ packages/common-ui/cypress/screenshots
80+ packages/common-ui/cypress/videos
81+ retention-days : 7
You can’t perform that action at this time.
0 commit comments