Skip to content

feat: Add option to disable inference #27

feat: Add option to disable inference

feat: Add option to disable inference #27

name: Build & Test
on:
pull_request:
branches:
- main
paths:
- public/**/*
- src/**/*
- '*.config.*'
- index.html
- package.json
- tsconfig*.json
- yarn.lock
- .github/workflows/build_and_test.yml
- .prettier*
push:
branches:
- main
paths:
- public/**/*
- src/**/*
- '*.config.*'
- index.html
- package.json
- tsconfig*.json
- yarn.lock
- .github/workflows/build_and_test.yml
- .prettier*
jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Yarn cache
uses: actions/cache@v4
id: yarn-cache
with:
path: ~/.yarn/
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Rust cache
uses: actions/cache@v4
id: rust-cache
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.rustup/
inference/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Set up Rust and wasm-pack
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. ~/.cargo/env
rustup update
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Lint and Build Rust
run: |
cd inference
cargo check
cargo clippy
wasm-pack build --release --target bundler
cd ..
- name: Set up Yarn
run: |
corepack enable
corepack install
yarn --version
YARN_CHECKSUM_BEHAVIOR=update yarn install
- name: Lint TypeScript
run: |
yarn run lint
yarn run check
- name: Build TypeScipt
run: yarn run build
- name: Test project
run: yarn test -- --run