Skip to content

Bump actions/checkout from 5 to 6 (#363) #1045

Bump actions/checkout from 5 to 6 (#363)

Bump actions/checkout from 5 to 6 (#363) #1045

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- uses: pre-commit/[email protected]
with:
extra_args: --all-files --hook-stage=manual
- name: Help message if pre-commit fail
if: ${{ failure() }}
run: |
echo "You can install pre-commit hooks to automatically run formatting"
echo "on each commit with:"
echo " pre-commit install"
echo "or you can run by hand on staged files with"
echo " pre-commit run"
echo "or after-the-fact on already committed files with"
echo " pre-commit run --all-files --hook-stage=manual"
test:
name: Run tests on ${{ matrix.os }} py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu, windows, macos]
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install mamba
uses: mamba-org/setup-micromamba@v2
with:
environment-name: jupyter_ydoc
- name: Install dependencies
run: |
micromamba install pip nodejs=18
pip install . --group test
- name: Build JavaScript assets
working-directory: javascript
run: |
yarn
yarn build
- name: Linter check
if: ${{ !contains(matrix.os, 'windows') }}
working-directory: javascript
run: |
yarn lint:check
- name: Integrity check
if: ${{ !contains(matrix.os, 'windows') }}
working-directory: javascript
run: |
set -ex
yarn integrity
if [[ $(git ls-files --exclude-standard -m | wc -l) > 0 ]]
then
echo "Integrity test failed; please run locally 'yarn integrity' and commit the changes"
exit 1
fi
- name: Run JS tests
working-directory: javascript
run: |
yarn build:test
yarn test:cov
- name: Run Python tests
if: ${{ !((matrix.python-version == '3.14') && (matrix.os == 'ubuntu')) }}
run: |
python -m pytest -v
- name: Run Python code coverage
if: ${{ (matrix.python-version == '3.14') && (matrix.os == 'ubuntu') }}
run: |
coverage run -m pytest -v
coverage report --show-missing