Skip to content

Commit

Permalink
Test the examples directory
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenDowney committed May 15, 2024
1 parent 32f6b73 commit a6d6980
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: tests

on:
push:
branches: [master]
pull_request:
schedule:
# Run on the first of the month
- cron: "0 0 1 * *"
workflow_dispatch:

jobs:
tests:
name: Tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run tests
run: |
make tests
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT_NAME = ModSimPy
PYTHON_VERSION = 3.8
PYTHON_VERSION = 3.10
PYTHON_INTERPRETER = python


Expand Down Expand Up @@ -29,4 +29,5 @@ clean:


tests:
cd chapters; pytest --nbmake chap01.ipynb
cd chapters; pytest --nbmake chap*.ipynb
cd examples; pytest --nbmake *.ipynb

0 comments on commit a6d6980

Please sign in to comment.