Skip to content

Commit 302b794

Browse files
Add js tests workflow
1 parent 2b32067 commit 302b794

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/js-tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: TS Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
types: [opened, synchronize, reopened]
9+
# Allows workflow to be called from other workflows
10+
workflow_call:
11+
inputs:
12+
ref:
13+
required: true
14+
type: string
15+
16+
# Avoid duplicate workflows on same branch
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}-playwright
19+
cancel-in-progress: true
20+
21+
jobs:
22+
js-tests:
23+
runs-on: ubuntu-latest
24+
25+
defaults:
26+
run:
27+
shell: bash
28+
29+
steps:
30+
- name: Checkout streamlit-bokeh code
31+
uses: actions/checkout@v4
32+
with:
33+
ref: ${{ inputs.ref }}
34+
persist-credentials: false
35+
submodules: "recursive"
36+
fetch-depth: 2
37+
- name: Setup Node
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version-file: ".nvmrc"
41+
cache: "npm"
42+
cache-dependency-path: "**/package-lock.json"
43+
- name: Run frontend tests
44+
run: |
45+
cd streamlit_bokeh/frontend
46+
npm install
47+
npm run test

0 commit comments

Comments
 (0)