Skip to content

Commit ba6eaa6

Browse files
committed
build(js): build js + wasm
1 parent 496a36d commit ba6eaa6

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: JS OpenFeature Provider CI
2+
3+
on:
4+
workflow_run:
5+
workflows: ["WASM CI"]
6+
types:
7+
- completed
8+
branches: [ main ]
9+
pull_request:
10+
paths:
11+
- 'openfeature-provider/js/**'
12+
- '.github/workflows/ci-js-openfeature-provider.yml'
13+
14+
jobs:
15+
js-openfeature-provider:
16+
runs-on: ubuntu-latest
17+
if: ${{ github.event_name == 'pull_request' || github.event.workflow_run.conclusion == 'success' }}
18+
defaults:
19+
run:
20+
working-directory: openfeature-provider/js
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Download WASM artifacts
27+
if: ${{ github.event_name == 'workflow_run' }}
28+
uses: actions/download-artifact@v4
29+
with:
30+
name: wasm-artifacts
31+
path: wasm/
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
run-id: ${{ github.event.workflow_run.id }}
34+
35+
- name: Setup protoc
36+
uses: arduino/setup-protoc@v3
37+
38+
- name: Setup Node.js
39+
uses: actions/setup-node@v4
40+
with:
41+
node-version: '22'
42+
43+
- name: Enable Corepack
44+
run: corepack enable
45+
46+
- name: Install dependencies
47+
run: yarn install --immutable
48+
49+
- name: Generate protobuf types
50+
run: yarn proto:gen
51+
52+
- name: Build
53+
run: yarn build
54+
55+
- name: Test
56+
run: yarn test

.github/workflows/ci-wasm.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,9 @@ jobs:
5555

5656
- name: clippy
5757
run: make lint
58+
59+
- name: Upload WASM artifacts
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: wasm-artifacts
63+
path: wasm/confidence_resolver.wasm

0 commit comments

Comments
 (0)