Skip to content

Commit

Permalink
add exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Aug 25, 2023
1 parent 92a98ca commit a484dec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/test_basics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
platform:
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest]

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -43,6 +43,7 @@ jobs:
run: |
cd demos
docker run -v `pwd`:/ivy/demos unifyai/ivy:latest demos/tests/test_demos.sh ${{ secrets.USER_API_KEY }} ${{ matrix.modules }}.ipynb "basics"
continue-on-error: true

results:
needs: run-tests
Expand Down
3 changes: 3 additions & 0 deletions tests/notebook_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def run_cell(shell, iopub, cell, kc):
def test_notebook(nb):
km = KernelManager()
km.start_kernel(extra_arguments=["--pylab=inline"], stderr=open(os.devnull, "w"))
exit_code = 0
try:
kc = km.client()
kc.start_channels()
Expand Down Expand Up @@ -214,6 +215,7 @@ def test_notebook(nb):
failed = True
if failed:
failures += 1
exit_code = 1
else:
successes += 1
sys.stdout.write(".")
Expand All @@ -227,6 +229,7 @@ def test_notebook(nb):
kc.stop_channels()
km.shutdown_kernel()
del km
exit(exit_code)


if __name__ == "__main__":
Expand Down

0 comments on commit a484dec

Please sign in to comment.