-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (30 loc) · 1.02 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: CI
on: [workflow_dispatch, pull_request, push]
env:
PYTHON_VERSION: 3.8
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