Skip to content

Bump actions/upload-artifact from 5.0.0 to 7.0.1 #853

Bump actions/upload-artifact from 5.0.0 to 7.0.1

Bump actions/upload-artifact from 5.0.0 to 7.0.1 #853

Workflow file for this run

name: JavaScript Tests
on:
push:
branches: '*'
pull_request:
branches: '*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
python-version: '3.12'
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-latest]
group: [notebook, base, services]
exclude:
- group: services
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ env.python-version }}
- name: Set up Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: '18.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@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
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@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
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@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
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 install -g casperjs@1.1.4 phantomjs-prebuilt@2.1.16
pip install .[test]
- name: Run Tests
run: |
python -m nbclassic.jstest ${{ matrix.group }}