Skip to content

Fix Hatch build fails in src directory #624

Fix Hatch build fails in src directory

Fix Hatch build fails in src directory #624

Workflow file for this run

name: JavaScript Tests
on:
push:
branches: '*'
pull_request:
branches: '*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
python-version: '3.12'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13]
group: [notebook, base, services]
exclude:
- group: services
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.python-version }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache yarn
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashfiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Cache pip on Linux
uses: actions/cache@v4
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ env.python-version }}-${{ hashfiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ env.python-version }}
- name: Cache pip on macOS
uses: actions/cache@v4
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ env.python-version }}-${{ hashfiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ env.python-version }}
- name: Temporary workaround for sanitizer loading in JS Tests
run: |
cp tools/security_deprecated.js nbclassic/static/base/js/security.js
- name: Install dependencies
run: |
pip install --upgrade pip
npm run build
npm install -g [email protected] [email protected]
pip install .[test]
- name: Run Tests
run: |
python -m nbclassic.jstest ${{ matrix.group }}