Skip to content

Commit

Permalink
CI: Add workflow to test gis models
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Aug 25, 2024
1 parent 3c031b5 commit 79b86b1
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/test_gis_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Test example models

on:
push:
paths:
- 'gis/**/*.py' # If a gis model is modified
- 'test_gis_examples.py' # If the gis test script is modified
- '.github/workflows/test_gis_examples.yml' # If this workflow is modified
pull_request:
paths:
- 'gis/**/*.py'
- 'test_gis_examples.py'
- '.github/workflows/test_gis_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.12"
# - name: Install dependencies
# run: pip install mesa pytest
# - name: Test with pytest
# run: pytest -rA -Werror 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.12"
- name: Install dependencies
run: |
pip install mesa mesa-geo --pre
pip install pytest
- name: Test with pytest
run: pytest -rA -Werror 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.12"
- name: Install dependencies
run: |
pip install pytest
pip install -U git+https://github.com/projectmesa/mesa@main#egg=mesa
pip install -U git+https://github.com/projectmesa/mesa-geo@main#egg=mesa-geo
- name: Test with pytest
run: pytest -rA -Werror test_gis_examples.py

0 comments on commit 79b86b1

Please sign in to comment.