Skip to content
name: Test RL models
on:
push:
paths:
- 'rl/**/*.py' # If a RL model is modified
- 'test_rl_examples.py' # If the RL test script is modified
- '.github/workflows/test_rl_examples.yml' # If this workflow is modified
- 'pyproject.toml'
pull_request:
paths:
- 'rl/**/*.py'
- 'test_rl_examples.py'
- '.github/workflows/test_rl_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 uv
run: pip install uv
- name: Install dependencies
run: uv pip install --system mesa pytest
- name: Install RL dependencies
run: uv pip install --system .[rl_example]
- name: Test with pytest
run: pytest -rA -Werror test_rl_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-geo --pre
# pip install .[test_gis]
# - name: Test with pytest
# run: pytest -rA -Werror test_gis_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 -U git+https://github.com/projectmesa/mesa-geo@main#egg=mesa-geo
# pip install .[test_gis]
# - name: Test with pytest
# run: pytest -rA -Werror test_gis_examples.py