Skip to content

Commit ee552f6

Browse files
committed
Github actions
1 parent 0f8c3ef commit ee552f6

File tree

9 files changed

+151
-4
lines changed

9 files changed

+151
-4
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: check dependencies
2+
on:
3+
push:
4+
branches: ["master"]
5+
pull_request:
6+
paths:
7+
- '**/package.json'
8+
- '.github/workflows/check_dependencies.yml'
9+
jobs:
10+
check-dependencies:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout the repository
14+
uses: actions/checkout@v4
15+
- name: Install dependencies
16+
run: npm i
17+
- name: Check if the dependencies are free of any conflict and match "overrides" in the root package.json
18+
run: npm ls
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: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 components package and demo apps
16+
run: |
17+
npm i
18+
npm run build -w @hyparam/components
19+
npm run build -w hyparquet
20+
npm run build -w hightable
21+
- name: Move the build outputs to a folder
22+
run: |
23+
mkdir -p build_outputs_folder
24+
echo "<h1 id="hyparam">Hyperparam</h1>" > build_outputs_folder/index.html
25+
echo "<ul>" >> build_outputs_folder/index.html
26+
echo "<li><a href="./hyparquet">hyparquet demo</a></li>" >> build_outputs_folder/index.html
27+
echo "<li><a href="./hightable">hightable demo</a></li>" >> build_outputs_folder/index.html
28+
echo "</ul>" >> build_outputs_folder/index.html
29+
echo "<h1 id="hyparam">Hyperparam</h1>" > build_outputs_folder/index.html
30+
echo "<ul>" >> build_outputs_folder/index.html
31+
echo "<li><a href="./hyparquet">hyparquet demo</a></li>" >> build_outputs_folder/index.html
32+
echo "<li><a href="./hightable">hightable demo</a></li>" >> build_outputs_folder/index.html
33+
echo "</ul>" >> build_outputs_folder/index.html
34+
mv hyparquet/dist build_outputs_folder/hyparquet
35+
mv hightable/dist build_outputs_folder/hightable
36+
- name: Upload static files as artifact
37+
id: deployment
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: build_outputs_folder/
41+
42+
# Deploy job
43+
deploy:
44+
needs: build
45+
permissions:
46+
pages: write # to deploy to Pages
47+
id-token: write # to verify the deployment originates from an appropriate source
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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
{
1111
extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
1212
// Set the react version

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ 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
{
1111
extends: [js.configs.recommended, ...tseslint.configs.strictTypeChecked, ...tseslint.configs.stylisticTypeChecked],
1212
// Set the react version

0 commit comments

Comments
 (0)