Skip to content

Commit abffd48

Browse files
committed
Github actions
1 parent 0f8c3ef commit abffd48

File tree

7 files changed

+150
-2
lines changed

7 files changed

+150
-2
lines changed

.github/workflows/_common_jobs.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
steps:
12+
- uses: actions/checkout@v4
13+
- run: npm i
14+
- run: npm run lint -w ${{ inputs.workspace }}
15+
16+
typecheck:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- run: npm i
21+
- run: npm run typecheck -w ${{ inputs.workspace }}
22+
23+
test:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- run: npm i
28+
- run: npm run coverage -w ${{ inputs.workspace }}
29+
30+
buildcheck:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- run: npm i
35+
- run: npm run build -w ${{ inputs.workspace }}
36+
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-demo
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
build-components:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout the repository
18+
uses: actions/checkout@v4
19+
- name: Build components package
20+
run: npm run build -w @hyparam/components
21+
ci:
22+
needs: build-components
23+
uses: ./.github/workflows/_common_jobs.yml
24+
with:
25+
workspace: hyparquet-demo

.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
```

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
```

0 commit comments

Comments
 (0)