forked from optuna/optuna-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
188 lines (156 loc) · 4.7 KB
/
typescript-tests.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
name: typescript-checks
on:
pull_request:
paths:
- '.github/workflows/typescript-tests.yml'
- '.eslintrc.js'
- 'biome.json'
- '**.ts'
- '**.tsx'
- 'optuna_dashboard/package.json'
- 'optuna_dashboard/package-lock.json'
- 'vscode/package.json'
- 'vscode/package-lock.json'
- 'tslib/react/package.json'
- 'tslib/react/package-lock.json'
- 'tslib/storage/package.json'
- 'tslib/storage/package-lock.json'
- 'optuna_dashboard/tsconfig.json'
- 'optuna_dashboard/tsconfig.pkg.json'
- 'optuna_dashboard/webpack.config.js'
jobs:
lint:
name: Lint checking on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'
- run: npm install
- run: npm run lint
type-check:
name: Type checking on optuna-dashboard & standalone_app
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Setup tslib
run: make tslib
- name: Type Check optuna_dashboard
working-directory: optuna_dashboard
run: |
npm install
npm run type-check
- name: Build rustlib for standalone_app
working-directory: rustlib
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack build --target web
- name: Type Check standalone_app
working-directory: standalone_app
run: |
npm install
npm run type-check
check-package-lock-json:
name: Check package-lock.json
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'
- working-directory: tslib/types
run: npm install
- working-directory: tslib/storage
run: npm install
- working-directory: tslib/react
run: npm install
- working-directory: optuna_dashboard
run: npm install
- working-directory: standalone_app
run: npm install
- working-directory: vscode
run: npm install
- run: git diff --exit-code
build:
name: JS build check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Build rustlib for standalone_app
working-directory: rustlib
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
wasm-pack build --target web
- name: Setup tslib
run: make tslib
- name: Build standalone_app for vscode extension
working-directory: standalone_app
run: |
npm install
npm run build:vscode
- name: Build standalone_app for GitHub pages
working-directory: standalone_app
run: |
npm install
npx vite build --out-dir ./gh-pages
- name: Build bundle.js
working-directory: optuna_dashboard
run: |
npm install
npm run build:dev
npm run build:prd
- name: Build optuna_dashboard package (for Jupyter Lab extension)
working-directory: optuna_dashboard
run: |
npm run build:pkg
test-tslib:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64
- name: Generate test asset for storage
working-directory: tslib/storage/test/
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off optuna
python generate_assets.py
- name: Generate test asset for react
working-directory: tslib/react/test/
run: |
python generate_assets.py
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '20'
cache: 'npm'
- name: Build test
run: make tslib
- name: Run tslib test for storage
working-directory: tslib/storage
run: |
npm run test
- name: Run tslib test for react
working-directory: tslib/react
run: |
npm run test