@@ -2,42 +2,54 @@ name: CI
22
33on :
44 push :
5- branches : [ main ]
5+ branches : [main]
66 pull_request :
7- branches : [ main ]
7+ branches : [main]
88 workflow_dispatch :
99
1010jobs :
1111 lint-and-build :
1212 runs-on : ubuntu-24.04
13-
13+
1414 strategy :
1515 matrix :
1616 node-version : [20, 22, 24]
17-
17+
18+ env :
19+ SAVE_PNG_PATH : ${{ github.workspace }}/renders
20+
1821 steps :
19- - name : Checkout code
20- uses : actions/checkout@v4
21-
22- - name : Use Node.js ${{ matrix.node-version }}
23- uses : actions/setup-node@v4
24- with :
25- node-version : ${{ matrix.node-version }}
26- cache : ' npm'
27-
28- - name : Install dependencies
29- run : npm ci
30-
31- - name : Run ESLint
32- run : npm run lint
33-
34- - name : Build Storybook
35- run : npm run storybook:build
36-
37- - name : Upload Storybook build artifacts
38- uses : actions/upload-artifact@v4
39- if : matrix.node-version == 20
40- with :
41- name : storybook-build
42- path : storybook-static/
43- retention-days : 30
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+
25+ - name : Use Node.js ${{ matrix.node-version }}
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : ${{ matrix.node-version }}
29+ cache : ' npm'
30+
31+ - name : Install dependencies
32+ run : npm ci
33+
34+ - name : Run ESLint
35+ run : npm run lint
36+
37+ - name : Run tests
38+ run : npm run test
39+
40+ - name : Build Storybook
41+ run : npm run storybook:build
42+
43+ - name : Upload Storybook build artifacts
44+ uses : actions/upload-artifact@v4
45+ if : matrix.node-version == 20
46+ with :
47+ name : storybook-build
48+ path : storybook-static/
49+
50+ - name : Upload element renders
51+ uses : actions/upload-artifact@v4
52+ if : matrix.node-version == 20
53+ with :
54+ name : element-renders
55+ path : renders/
0 commit comments