Skip to content

Commit a6d6980

Browse files
committed
Test the examples directory
1 parent 32f6b73 commit a6d6980

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

.github/workflows/tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: tests
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
schedule:
8+
# Run on the first of the month
9+
- cron: "0 0 1 * *"
10+
workflow_dispatch:
11+
12+
jobs:
13+
tests:
14+
name: Tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: ["3.10"]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -r requirements-dev.txt
33+
34+
- name: Run tests
35+
run: |
36+
make tests

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PROJECT_NAME = ModSimPy
2-
PYTHON_VERSION = 3.8
2+
PYTHON_VERSION = 3.10
33
PYTHON_INTERPRETER = python
44

55

@@ -29,4 +29,5 @@ clean:
2929

3030

3131
tests:
32-
cd chapters; pytest --nbmake chap01.ipynb
32+
cd chapters; pytest --nbmake chap*.ipynb
33+
cd examples; pytest --nbmake *.ipynb

0 commit comments

Comments
 (0)