-
-
Notifications
You must be signed in to change notification settings - Fork 245
66 lines (61 loc) · 1.9 KB
/
test_examples.yml
File metadata and controls
66 lines (61 loc) · 1.9 KB
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
name: Test example models
on:
push:
paths:
- 'examples/**/*.py' # If an example model is modified
- 'test_examples.py' # If the test script is modified
- '.github/workflows/test_examples.yml' # If this workflow is modified
pull_request:
paths:
- 'examples/**/*.py'
- 'test_examples.py'
- '.github/workflows/test_examples.yml'
workflow_dispatch:
schedule:
- cron: '0 6 * * 1' # Monday at 6:00 UTC
jobs:
# build-stable:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: "3.14"
# - name: Install dependencies
# run: pip install mesa[network] pytest
# - name: Test with pytest
# run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py
build-pre:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install dependencies
run: |
pip install mesa[network] --pre
pip install .[test]
- name: Test with pytest
run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py
build-main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install dependencies
run: |
pip install .[test]
pip install -U "mesa[network] @ git+https://github.com/mesa/mesa@main"
- name: Test with pytest
run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning --cov=examples --cov-report=xml --cov-report=term test_examples.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
fail_ci_if_error: false