Skip to content

Split any YouTube song into stems

TypeScript

ci: run unit tests and typecheck on pull requests

David Naviabb2d15e527d7
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
new file mode 100644
index 0000000..8c0c9fb
--- /dev/null
+++ b/.github/workflows/unit-tests.yml
@@ -0,0 +1,37 @@
+name: unit-tests
+
+# fast checks that need no engine or display: the node:test suites
+# (test:audio), both TypeScript projects and the numpy-only python tests
+# (test:py). The smoke workflows cover the app end to end on tags
+
+on:
+ pull_request:
+ push:
+ branches: [main]
+ workflow_dispatch:
+
+jobs:
+ unit:
+ runs-on: ubuntu-22.04
+ timeout-minutes: 15
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 24
+
+ - uses: actions/setup-python@v5
+ with:
+ python-version: '3.11'
+
+ - run: npm ci
+
+ - run: npm run typecheck
+
+ - run: npm run test:audio
+
+ - name: Python tests
+ run: |
+ python -m pip install "numpy<2"
+ STEMKIT_PY=python npm run test:py