Skip to content

build(js): local resolver js build #2

build(js): local resolver js build

build(js): local resolver js build #2

name: JS OpenFeature Provider CI
on:
workflow_run:
workflows: ["WASM CI"]
types:
- completed
branches: [ main ]
pull_request:
paths:
- 'openfeature-provider/js/**'
- '.github/workflows/ci-js-openfeature-provider.yml'
jobs:
wasm-build:
uses: ./.github/workflows/ci-wasm.yml

Check failure on line 16 in .github/workflows/ci-js-openfeature-provider.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-js-openfeature-provider.yml

Invalid workflow file

error parsing called workflow ".github/workflows/ci-js-openfeature-provider.yml" -> "./.github/workflows/ci-wasm.yml" : workflow is not reusable as it is missing a `on.workflow_call` trigger
if: ${{ github.event_name == 'pull_request' }}
js-openfeature-provider:
runs-on: ubuntu-latest
needs: wasm-build
if: ${{ always() && (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'pull_request' && needs.wasm-build.result == 'success') }}
defaults:
run:
working-directory: openfeature-provider/js
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download WASM artifacts (from workflow run)
if: ${{ github.event_name == 'workflow_run' }}
uses: actions/download-artifact@v4
with:
name: wasm-artifacts
path: wasm/
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Download WASM artifacts (from PR build)
if: ${{ github.event_name == 'pull_request' }}
uses: actions/download-artifact@v4
with:
name: wasm-artifacts
path: wasm/
- name: Setup protoc
uses: arduino/setup-protoc@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Enable Corepack
run: corepack enable
- name: Install dependencies
run: yarn install --immutable
- name: Generate protobuf types
run: yarn proto:gen
- name: Build
run: yarn build
- name: Test
run: yarn test