-
Notifications
You must be signed in to change notification settings - Fork 880
57 lines (54 loc) · 1.35 KB
/
examples.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
name: Examples
on:
push:
branches:
- main
- release**
- "**maintenance"
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
jobs:
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install uv
run: pip install uv
- name: Install dependencies
run: uv pip install --system .[examples]
- name: Checkout mesa-examples
uses: actions/checkout@v4
with:
repository: projectmesa/mesa-examples
path: mesa-examples
- name: Test examples
run: |
cd mesa-examples
pytest -rA -Werror -Wdefault::FutureWarning test_examples.py
tutorials:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install uv
run: pip install uv
- name: Install dependencies
run: uv pip install --system . pytest nbval jupyter nbconvert
# Run Pytest on Jupyter Notebooks
- name: Test Jupyter Notebooks with Pytest
run: pytest -rA -Werror -Wdefault::FutureWarning tests/test_tutorials.py