Add a GitHub Workflow to validate JS bindings
This commit is contained in:
22
.github/actions/install-emsdk/action.yml
vendored
Normal file
22
.github/actions/install-emsdk/action.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: Install emsdk (including emcc)
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: EMCC Version to install
|
||||||
|
required: false
|
||||||
|
default: 3.1.28
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Clone emsdk repo
|
||||||
|
working-directory: ${{ runner.temp }}
|
||||||
|
shell: bash
|
||||||
|
run: git clone https://github.com/emscripten-core/emsdk.git
|
||||||
|
|
||||||
|
- name: emdsk install
|
||||||
|
working-directory: ${{ runner.temp }}/emsdk
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
./emsdk install ${{ inputs.version }}
|
||||||
|
./emsdk activate ${{ inputs.version }}
|
||||||
|
source $RUNNER_TEMP/emsdk/emsdk_env.sh
|
17
.github/actions/setup-js/action.yml
vendored
Normal file
17
.github/actions/setup-js/action.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
name: Setup JavaScript envirionment
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 18.x
|
||||||
|
|
||||||
|
- name: Install emsdk
|
||||||
|
uses: ./.github/actions/install-emsdk
|
||||||
|
|
||||||
|
- name: yarn install
|
||||||
|
shell: bash
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
working-directory: javascript
|
6
.github/actions/setup-website/action.yml
vendored
6
.github/actions/setup-website/action.yml
vendored
@@ -3,11 +3,15 @@ name: Setup Website envirionment
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Install NodeJS 12
|
# TODO: Update to latest when website is moved to the workspace version of
|
||||||
|
# yoga-layout
|
||||||
|
- name: Install Node
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: 12.x
|
||||||
|
|
||||||
|
# TODO: the website should be in a yarn workspace with the library, but the
|
||||||
|
# current version of gatsby is incompatible with hoisting.
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
shell: bash
|
shell: bash
|
||||||
run: yarn install --frozen-lockfile
|
run: yarn install --frozen-lockfile
|
||||||
|
27
.github/workflows/validate-js.yml
vendored
Normal file
27
.github/workflows/validate-js.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: JavaScript
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build + Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup
|
||||||
|
uses: ./.github/actions/setup-js
|
||||||
|
|
||||||
|
- name: yarn build
|
||||||
|
run: yarn build
|
||||||
|
working-directory: javascript
|
||||||
|
|
||||||
|
- name: yarn test
|
||||||
|
run: yarn test
|
||||||
|
working-directory: javascript
|
Reference in New Issue
Block a user