Skip to content

Commit 378ad5d

Browse files
committed
Github actions
1 parent 0f8c3ef commit 378ad5d

File tree

8 files changed

+142
-6
lines changed

8 files changed

+142
-6
lines changed

.github/workflows/_common_jobs.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Launch CI jobs for a package or app
2+
on:
3+
workflow_call:
4+
inputs:
5+
workspace:
6+
required: true
7+
type: string
8+
jobs:
9+
# lint:
10+
# runs-on: ubuntu-latest
11+
# defaults:
12+
# run:
13+
# working-directory: ${{ inputs.workspace }}
14+
# steps:
15+
# - uses: actions/checkout@v4
16+
# - run: npm i
17+
# - run: npm run lint
18+
19+
typecheck:
20+
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: ${{ inputs.workspace }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
- run: npm i
27+
- run: npm run typecheck
28+
29+
test:
30+
runs-on: ubuntu-latest
31+
defaults:
32+
run:
33+
working-directory: ${{ inputs.workspace }}
34+
steps:
35+
- uses: actions/checkout@v4
36+
- run: npm i
37+
- run: npm run coverage
38+
39+
buildcheck:
40+
runs-on: ubuntu-latest
41+
defaults:
42+
run:
43+
working-directory: ${{ inputs.workspace }}
44+
steps:
45+
- uses: actions/checkout@v4
46+
- run: npm i
47+
- run: npm run build
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: hightable-demo
2+
on:
3+
push:
4+
branches: ["master"]
5+
pull_request:
6+
paths:
7+
- 'hightable/**'
8+
- '.github/workflows/_common_jobs.yml'
9+
- '.github/workflows/ci_hightable_demo.yml'
10+
jobs:
11+
ci:
12+
uses: ./.github/workflows/_common_jobs.yml
13+
with:
14+
workspace: hightable
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: hyparquet-demo
2+
on:
3+
push:
4+
branches: ["master"]
5+
pull_request:
6+
paths:
7+
- 'packages/components/**'
8+
- 'hyparquet/**'
9+
- '.github/workflows/_common_jobs.yml'
10+
- '.github/workflows/ci_hyparquet_demo.yml'
11+
jobs:
12+
ci:
13+
uses: ./.github/workflows/_common_jobs.yml
14+
with:
15+
workspace: hyparquet

.github/workflows/deploy_pages.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
# Build job
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout the repository
14+
uses: actions/checkout@v4
15+
- name: Build demo apps
16+
run: |
17+
npm i
18+
npm run build -w hyparquet
19+
npm run build -w hightable
20+
- name: Move the build outputs to a folder
21+
run: |
22+
mkdir -p build_outputs_folder
23+
echo "<h1 id="hyparam">Hyperparam</h1>" > build_outputs_folder/index.html
24+
echo "<ul>" >> build_outputs_folder/index.html
25+
echo "<li><a href="./hyparquet">hyparquet demo</a></li>" >> build_outputs_folder/index.html
26+
echo "<li><a href="./hightable">hightable demo</a></li>" >> build_outputs_folder/index.html
27+
echo "</ul>" >> build_outputs_folder/index.html
28+
echo "<h1 id="hyparam">Hyperparam</h1>" > build_outputs_folder/index.html
29+
echo "<ul>" >> build_outputs_folder/index.html
30+
echo "<li><a href="./hyparquet">hyparquet demo</a></li>" >> build_outputs_folder/index.html
31+
echo "<li><a href="./hightable">hightable demo</a></li>" >> build_outputs_folder/index.html
32+
echo "</ul>" >> build_outputs_folder/index.html
33+
mv hyparquet/dist build_outputs_folder/hyparquet
34+
mv hightable/dist build_outputs_folder/hightable
35+
- name: Upload static files as artifact
36+
id: deployment
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: build_outputs_folder/
40+
41+
# Deploy job
42+
deploy:
43+
needs: build
44+
permissions:
45+
pages: write # to deploy to Pages
46+
id-token: write # to verify the deployment originates from an appropriate source
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

hightable/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This is an example project showing how to use [hightable](https://github.com/hyp
55
## Build
66

77
```bash
8-
cd apps/hightable-demo
98
npm i
109
npm run build
1110
```

hightable/eslint.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ import globals from 'globals'
66
import tseslint from 'typescript-eslint'
77

88
export default tseslint.config(
9-
{ ignores: ['dist', 'coverage/'] },
9+
{ ignores: ['dist', 'coverage', 'node_modules'] },
1010
{
11-
extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
11+
extends: [
12+
js.configs.recommended,
13+
...tseslint.configs.strictTypeChecked,
14+
...tseslint.configs.stylisticTypeChecked
15+
],
1216
// Set the react version
1317
settings: { react: { version: '18.3' } },
1418
files: ['src/**/*.{ts,tsx}'],

hyparquet/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This is an example project showing how to use [hyparquet](https://github.com/hyp
55
## Build
66

77
```bash
8-
cd apps/hyparquet-demo
98
npm i
109
npm run build
1110
```

hyparquet/eslint.config.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ import globals from 'globals'
66
import tseslint from 'typescript-eslint'
77

88
export default tseslint.config(
9-
{ ignores: ['dist', 'coverage'] },
9+
{ ignores: ['dist', 'coverage', 'node_modules'] },
1010
{
11-
extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
11+
extends: [
12+
js.configs.recommended,
13+
...tseslint.configs.strictTypeChecked,
14+
...tseslint.configs.stylisticTypeChecked
15+
],
1216
// Set the react version
1317
settings: { react: { version: '18.3' } },
1418
files: ['src/**/*.{ts,tsx}'],

0 commit comments

Comments
 (0)