WIP #558
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [workflow_dispatch, pull_request, push] | |
env: | |
PYTHON_VERSION: 3.11 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Use nbdev CI Workflow | |
uses: fastai/workflows/nbdev-ci@master | |
with: | |
# The python version that nbdev ci must run on must match the python version used | |
version: ${{ env.PYTHON_VERSION }} | |
skip_test: true | |
- name: Run Tests | |
run: | | |
# Capture both stdout and stderr to a temporary file | |
python nbdev_test.py > /tmp/test_output.txt | |
cat /tmp/test_output.txt # Print the test output for debugging purposes | |
if grep -q "nbdev Tests Failed On The Following Notebooks:" /tmp/test_output.txt; then | |
echo "nbdev Tests Failed" | |
exit 1 | |
fi | |
shell: bash |