-
Notifications
You must be signed in to change notification settings - Fork 252
53 lines (44 loc) · 1.76 KB
/
test_all_notebooks.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This workflows executes all example notebooks to ensure they are up-to-date.
name: test_all_notebooks
defaults:
run:
shell: bash # To override PowerShell on Windows
on:
# Trigger the workflow on manual dispatch and once a week
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
test_notebooks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Continue to run other builds despite a failure
matrix:
os: [ubuntu-latest]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
include: # Run macos and windows tests on only one python version
- os: windows-latest
python-version: '3.11'
- os: macos-latest
python-version: '3.11'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade --upgrade-strategy eager -r requirements/dev.txt -r testing/requirements.txt
python -m pip install --upgrade --upgrade-strategy eager .[shap,tensorflow]
if [ "$RUNNER_OS" != "Windows" ]; then
# Windows support for ray is experimental (https://docs.ray.io/en/latest/installation.html#windows-support)
python -m pip install --upgrade --upgrade-strategy eager .[shap,tensorflow,ray]
fi
python -m spacy download en_core_web_md
python -m pip freeze
- name: Run notebooks
run: |
pytest --suppress-no-test-exit-code --no-cov -rA --durations=0 -vv testing/test_notebooks.py