|
| 1 | +name: Test viz |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths: |
| 6 | + - 'examples/**/app.py' # If an example visualisation is modified |
| 7 | + - 'examples/**/viz.py' # If an example visualisation is modified |
| 8 | + - 'viz.py' # If the test script is modified |
| 9 | + - '.github/workflows/test_viz.yml' # If this workflow is modified |
| 10 | + pull_request: |
| 11 | + paths: |
| 12 | + - 'examples/**/*.py' |
| 13 | + - 'test_examples.py' |
| 14 | + - '.github/workflows/test_examples.yml' |
| 15 | + workflow_dispatch: |
| 16 | + schedule: |
| 17 | + - cron: '0 6 * * 1' # Monday at 6:00 UTC |
| 18 | + |
| 19 | +jobs: |
| 20 | + # build-stable: |
| 21 | + # runs-on: ubuntu-latest |
| 22 | + # steps: |
| 23 | + # - uses: actions/checkout@v4 |
| 24 | + # - name: Set up Python |
| 25 | + # uses: actions/setup-python@v5 |
| 26 | + # with: |
| 27 | + # python-version: "3.12" |
| 28 | + # - name: Install dependencies |
| 29 | + # run: pip install mesa pytest |
| 30 | + # - name: Test with pytest |
| 31 | + # run: pytest -rA -Werror test_examples.py |
| 32 | + |
| 33 | + build-pre: |
| 34 | + runs-on: ubuntu-latest |
| 35 | + steps: |
| 36 | + - uses: actions/checkout@v4 |
| 37 | + - name: Set up Python |
| 38 | + uses: actions/setup-python@v5 |
| 39 | + with: |
| 40 | + python-version: "3.12" |
| 41 | + - name: Install dependencies |
| 42 | + run: | |
| 43 | + pip install --pre mesa[viz] |
| 44 | + pip install .[test] |
| 45 | + - name: Test with pytest |
| 46 | + run: pytest -rA -Werror -Wdefault::FutureWarning viz.py |
| 47 | + |
| 48 | +# build-main: |
| 49 | +# runs-on: ubuntu-latest |
| 50 | +# steps: |
| 51 | +# - uses: actions/checkout@v4 |
| 52 | +# - name: Set up Python |
| 53 | +# uses: actions/setup-python@v5 |
| 54 | +# with: |
| 55 | +# python-version: "3.12" |
| 56 | +# - name: Install dependencies |
| 57 | +# run: | |
| 58 | +# pip install .[test] |
| 59 | +# pip install -U git+https://github.com/projectmesa/mesa@main#egg=mesa |
| 60 | +# - name: Test with pytest |
| 61 | +# run: pytest -rA -Werror -Wdefault::FutureWarning test_examples.py |
0 commit comments