Add js tests workflow #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TS Unit Tests | ||
on: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
# Allows workflow to be called from other workflows | ||
workflow_call: | ||
inputs: | ||
ref: | ||
required: true | ||
type: string | ||
# Avoid duplicate workflows on same branch | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-playwright | ||
cancel-in-progress: true | ||
jobs: | ||
js-tests: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Checkout streamlit-bokeh code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
persist-credentials: false | ||
submodules: "recursive" | ||
fetch-depth: 2 | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "npm" | ||
cache-dependency-path: "**/package-lock.json" | ||
- name: Run frontend tests | ||
run: | | ||
cd streamlit_bokeh/frontend | ||
npm install | ||
npm run test |