Skip to content

Added Basic Visualization tests #2767

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 46 additions & 44 deletions .github/workflows/build_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ name: build
on:
push:
branches:
- main
- release**
- main
- release**
paths-ignore:
- '**.md'
- "**.md"
pull_request:
paths-ignore:
- '**.md'
- "**.md"
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
- cron: "0 6 * * 1"

# This will cancel previous run if a newer job that obsoletes the said previous
# run, is started.
Expand Down Expand Up @@ -42,46 +42,48 @@ jobs:
# python-version: 'pypy-3.8'

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: 'pip'
- name: Install uv
run: pip install uv
- name: Install Mesa and dependencies
run: uv pip install --system .[dev]
- name: Test with pytest
run: pytest --durations=10 --cov=mesa tests/ --cov-report=xml
- if: matrix.os == 'ubuntu'
name: Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: "pip"
- name: Install uv
run: pip install uv
- name: Install Mesa and dependencies
run: uv pip install --system .[dev]
- name: Setup Playwright
run: playwright install
- name: Test with pytest
run: pytest --durations=10 --cov=mesa tests/ --cov-report=xml
- if: matrix.os == 'ubuntu'
name: Codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
allow-prereleases: true
cache: 'pip'
- name: Install uv
run: pip install uv
- name: Install Mesa
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 -Wi::DeprecationWarning test_examples.py
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
allow-prereleases: true
cache: "pip"
- name: Install uv
run: pip install uv
- name: Install Mesa
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 -Wi::DeprecationWarning test_examples.py
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ dev = [
"pytest-cov",
"sphinx",
"pytest-mock",
"pytest-playwright",
"pytest-ipywidgets",
"playwright",
"ipython>=9.2.0",
]
examples = [
Expand Down
Loading