forked from jupyter-book/jupyter-book
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.48 KB
/
scheduled_tests.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: scheduled-tests
on:
schedule:
# Run at the beginning of each day
- cron: '0 0 * * *'
jobs:
tests-windows:
name: Run tests and build docs on Windows
runs-on: windows-latest
strategy:
matrix:
# Using the default python in the Windows 2022 github actions runner
# ref: https://github.com/actions/virtual-environments/issues/4856
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
- name: Run pytest
run: pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/
osx:
name: Run Tests on OS X
runs-on: macos-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- uses: actions/cache@v3
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
# Install libmagic to avoid a flaky Fonts error with matplotlib
# ref: https://stackoverflow.com/questions/62279920/python-macos-error-unable-to-revert-mtime-library-fonts
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install --upgrade-strategy eager -e .[testing,sphinx]
brew install libmagic
- name: Run Pytest
run: |
pytest --durations=10 -m 'not requires_chrome and not requires_tex' --jb-tempdir local_path
- name: Build the book
run: |
jb build -W -n --keep-going --builder html docs/