Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add leopard react #288

Merged
merged 22 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/react-codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: React Codestyle

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- '**/react/*.js'
- '**/react/*.ts'
- '**/react/*.jsx'
- '**/react/*.tsx'
- '.github/workflows/react-codestyle.yml'
pull_request:
branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- '**/react/*.js'
- '**/react/*.ts'
- '**/react/*.jsx'
- '**/react/*.tsx'
- '.github/workflows/react-codestyle.yml'

jobs:
check-react-codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Node.js LTS
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Pre-build dependencies
run: npm install yarn

- name: Run Binding Linter
run: yarn && yarn lint
working-directory: binding/react

- name: Run Demo Linter
run: yarn && yarn lint
working-directory: demo/react
48 changes: 48 additions & 0 deletions .github/workflows/react-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: React Demos

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'demo/react/**'
- '!demo/react/README.md'
- '.github/workflows/react-demos.yml'
pull_request:
branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- 'demo/react/**'
- '!demo/react/README.md'
- '.github/workflows/react-demos.yml'

defaults:
run:
working-directory: demo/react

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn

- name: Install dependencies
run: yarn install

- name: Build English
run: yarn build en

- name: Build Other Language
run: yarn build ko
59 changes: 59 additions & 0 deletions .github/workflows/react.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: React

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'binding/react/**'
- '!binding/react/README.md'
- 'lib/common/**'
- 'lib/wasm/**'
- 'resources/.test/**'
- 'resources/audio_samples/**'
- '.github/workflows/react.yml'
pull_request:
branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- 'binding/react/**'
- '!binding/react/README.md'
- 'lib/common/**'
- 'lib/wasm/**'
- 'resources/.test/**'
- 'resources/audio_samples/**'
- '.github/workflows/react.yml'

defaults:
run:
working-directory: binding/react

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Pre-build dependencies
run: npm install yarn

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build

- name: Set up test
run: yarn setup-test

- name: Run test
run: yarn test --env ACCESS_KEY=${{secrets.PV_VALID_ACCESS_KEY}}
4 changes: 4 additions & 0 deletions binding/react/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": ["@babel/preset-env"],
"plugins": ["@babel/plugin-transform-runtime"]
}
4 changes: 4 additions & 0 deletions binding/react/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
**/rollup.config.js
.eslintrc.js
Loading