Skip to content

Workflow file for this run

name: CI
on: [workflow_dispatch, pull_request, push]
name: CI

Check failure on line 4 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

You have an error in your yaml syntax on line 4
on:
workflow_dispatch:
pull_request:
push:
branches: [master]
jobs:
nbdev-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "pip"
cache-dependency-path: settings.ini
- name: Test ibrary Sync
shell: bash
run: |
set -ux
python -m pip install --upgrade pip
pip install -U nbdev
echo "Check we are starting with clean git checkout"
if [[ `git status --porcelain -uno` ]]; then
git diff
echo "git status is not clean"
false
fi
echo "Trying to strip out notebooks"
nbdev_clean
echo "Check that strip out was unnecessary"
git status -s # display the status to see which nbs need cleaning up
if [[ `git status --porcelain -uno` ]]; then
git status -uno
echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_hooks"
echo -e "This error can also happen if you are using an older version of nbdev relative to what is in CI. Please try to upgrade nbdev with the command `pip install -U nbdev`"
false
fi
nbdev_export
if [[ `git status --porcelain -uno` ]]; then
echo "::error::Notebooks and library are not in sync. Please run nbdev_export."
git status -uno
git diff
exit 1;
fi