Skip to content

Commit fe32a55

Browse files
committed
Github actions
1 parent 0f8c3ef commit fe32a55

File tree

9 files changed

+146
-4
lines changed

9 files changed

+146
-4
lines changed

.github/workflows/_common_jobs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
steps:
22+
- uses: actions/checkout@v4
23+
- run: npm i
24+
- run: npm run typecheck
25+
26+
test:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- run: npm i
31+
- run: npm run coverage
32+
33+
buildcheck:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
- run: npm i
38+
- 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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
- 'eslint.config.js'
11+
- 'package.json'
12+
jobs:
13+
ci:
14+
uses: ./.github/workflows/_common_jobs.yml
15+
with:
16+
workspace: hightable
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
- 'eslint.config.js'
12+
- 'package.json'
13+
jobs:
14+
ci:
15+
uses: ./.github/workflows/_common_jobs.yml
16+
with:
17+
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)