on: 
  pull_request:
    paths:
      - .github/actions/extism/**
      - .github/workflows/ci-node.yml
      - manifest/**
      - runtime/**
      - libextism/**
      - browser/**
  workflow_dispatch:

name: Browser CI

jobs:
  node:
    name: Browser
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        rust:
          - stable
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
      - uses: ./.github/actions/extism
      - name: Setup Node env
        uses: actions/setup-node@v3
        with:
          node-version: 18

      - name: Test Browser Runtime
        run: |
          cd browser
          npm i
          npm run test
