Skip to content

bump

bump #379

Workflow file for this run

# Simplified github actions
# https://github.com/AnswerDotAI/workflows/blob/master/nbdev-ci/action.yml
name: 'nbdev-ci'
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
version: "0.9.10"
- name: Test with nbdev
shell: bash
run: |
set -ux
uv venv --python 3.12
source .venv/bin/activate
uv pip install ".[dev]"
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
LITELLM_LOG=DEBUG nbdev-test