-
Notifications
You must be signed in to change notification settings - Fork 106
105 lines (99 loc) · 2.83 KB
/
ci.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
env:
wd: ./packages/builder-vite
steps:
- uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: 'yarn'
cache-dependency-path: ${{env.wd}}/yarn.lock
- name: Install dependencies
run: yarn install
working-directory: ${{env.wd}}
- name: Build builder
run: yarn build
working-directory: ${{env.wd}}
- name: Archive built files
uses: actions/upload-artifact@v3
with:
name: builder-vite
path: |
./packages/builder-vite/dist
lint:
needs: build
runs-on: ubuntu-latest
env:
wd: ./packages/builder-vite
steps:
- uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v2
with:
node-version: 16.x
cache: 'yarn'
cache-dependency-path: ${{env.wd}}/yarn.lock
- name: Install dependencies
run: yarn install
working-directory: ${{env.wd}}
- name: Restore builder-vite dist
uses: actions/download-artifact@v3
with:
name: builder-vite
path: |
./packages/builder-vite/dist
- name: Lint
run: yarn lint-ci
working-directory: ${{env.wd}}
examples:
needs: build
env:
wd: ./examples/${{ matrix.framework }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [16.x]
os: [ubuntu-latest, windows-latest, macOS-latest]
framework: [lit-ts, preact, react, react-18, react-ts, svelte, vue2.6, vue2.7, vue3, workspaces]
steps:
- uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'yarn'
cache-dependency-path: ${{env.wd}}/yarn.lock
- name: Install dependencies
run: yarn install
working-directory: ${{env.wd}}
- name: Install builder-vite dependencies
run: yarn install
working-directory: packages/builder-vite
- name: Restore builder-vite dist
uses: actions/download-artifact@v3
with:
name: builder-vite
path: |
./packages/builder-vite/dist
- name: Build example
run: yarn build-storybook
working-directory: ${{env.wd}}
- name: Test built example
run: yarn test-ci
working-directory: ${{env.wd}}
env:
# Workaround for https://github.com/facebook/jest/issues/8536
TEMP: ${{ runner.temp }}