Skip to content

feat: allow local evaluation #215

feat: allow local evaluation

feat: allow local evaluation #215

Workflow file for this run

name: Pull Request
on:
pull_request:
branches:
- master
paths-ignore:
- "**/**.md"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: 20
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
EXAMPLE_PATH: ./example
jobs:
install-dependencies:
name: Install dependencies
runs-on: ubuntu-latest
outputs:
YARN_CACHE_DIR: ${{ steps.yarn-cache-dir-path.outputs.dir }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
id: yarn-cache
with:
path: |
**/node_modules
**/.eslintcache
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Init
run: make init
lint:
name: Lint
needs: install-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v4
id: yarn-cache
with:
path: |
**/node_modules
**/.eslintcache
${{ needs.install-dependencies.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Format
run: make fmt
- name: Lint
run: make lint
unit-test:
name: Unit test
needs: install-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v4
id: yarn-cache
with:
path: |
**/node_modules
**/.eslintcache
${{ needs.install-dependencies.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Unit test
run: make test
build:
name: Build
needs: install-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: actions/cache@v4
id: yarn-cache
with:
path: |
**/node_modules
**/.eslintcache
${{ needs.install-dependencies.outputs.YARN_CACHE_DIR }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: SDK Build
run: make build
- name: Copy generated files
run: make copy-genfiles
- name: Example Init
working-directory: ${{ env.EXAMPLE_PATH }}
run: make init
- name: Example Build
working-directory: ${{ env.EXAMPLE_PATH }}
run: make build