Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0849593

Browse filesBrowse files
Added Basic Visualization tests (#2767)
* added basic viz tests * added library requirements * enable playwright * replace time.sleep with playwright wait
1 parent d1e6b8b commit 0849593
Copy full SHA for 0849593

File tree

Expand file treeCollapse file tree

3 files changed

+392
-44
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+392
-44
lines changed

‎.github/workflows/build_lint.yml

Copy file name to clipboardExpand all lines: .github/workflows/build_lint.yml
+46-44Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ name: build
33
on:
44
push:
55
branches:
6-
- main
7-
- release**
6+
- main
7+
- release**
88
paths-ignore:
9-
- '**.md'
9+
- "**.md"
1010
pull_request:
1111
paths-ignore:
12-
- '**.md'
12+
- "**.md"
1313
workflow_dispatch:
1414
schedule:
15-
- cron: '0 6 * * 1'
15+
- cron: "0 6 * * 1"
1616

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

4444
steps:
45-
- uses: actions/checkout@v4
46-
- name: Set up Python ${{ matrix.python-version }}
47-
uses: actions/setup-python@v5
48-
with:
49-
python-version: ${{ matrix.python-version }}
50-
allow-prereleases: true
51-
cache: 'pip'
52-
- name: Install uv
53-
run: pip install uv
54-
- name: Install Mesa and dependencies
55-
run: uv pip install --system .[dev]
56-
- name: Test with pytest
57-
run: pytest --durations=10 --cov=mesa tests/ --cov-report=xml
58-
- if: matrix.os == 'ubuntu'
59-
name: Codecov
60-
uses: codecov/codecov-action@v5
61-
with:
62-
fail_ci_if_error: true
63-
token: ${{ secrets.CODECOV_TOKEN }}
45+
- uses: actions/checkout@v4
46+
- name: Set up Python ${{ matrix.python-version }}
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
allow-prereleases: true
51+
cache: "pip"
52+
- name: Install uv
53+
run: pip install uv
54+
- name: Install Mesa and dependencies
55+
run: uv pip install --system .[dev]
56+
- name: Setup Playwright
57+
run: playwright install
58+
- name: Test with pytest
59+
run: pytest --durations=10 --cov=mesa tests/ --cov-report=xml
60+
- if: matrix.os == 'ubuntu'
61+
name: Codecov
62+
uses: codecov/codecov-action@v5
63+
with:
64+
fail_ci_if_error: true
65+
token: ${{ secrets.CODECOV_TOKEN }}
6466

6567
examples:
6668
runs-on: ubuntu-latest
6769
steps:
68-
- uses: actions/checkout@v4
69-
- name: Set up Python
70-
uses: actions/setup-python@v5
71-
with:
72-
python-version: "3.13"
73-
allow-prereleases: true
74-
cache: 'pip'
75-
- name: Install uv
76-
run: pip install uv
77-
- name: Install Mesa
78-
run: uv pip install --system .[examples]
79-
- name: Checkout mesa-examples
80-
uses: actions/checkout@v4
81-
with:
82-
repository: projectmesa/mesa-examples
83-
path: mesa-examples
84-
- name: Test examples
85-
run: |
86-
cd mesa-examples
87-
pytest -rA -Werror -Wdefault::FutureWarning -Wi::DeprecationWarning test_examples.py
70+
- uses: actions/checkout@v4
71+
- name: Set up Python
72+
uses: actions/setup-python@v5
73+
with:
74+
python-version: "3.13"
75+
allow-prereleases: true
76+
cache: "pip"
77+
- name: Install uv
78+
run: pip install uv
79+
- name: Install Mesa
80+
run: uv pip install --system .[examples]
81+
- name: Checkout mesa-examples
82+
uses: actions/checkout@v4
83+
with:
84+
repository: projectmesa/mesa-examples
85+
path: mesa-examples
86+
- name: Test examples
87+
run: |
88+
cd mesa-examples
89+
pytest -rA -Werror -Wdefault::FutureWarning -Wi::DeprecationWarning test_examples.py

‎pyproject.toml

Copy file name to clipboardExpand all lines: pyproject.toml
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ dev = [
6565
"pytest-cov",
6666
"sphinx",
6767
"pytest-mock",
68+
"pytest-playwright",
69+
"pytest-ipywidgets",
70+
"playwright",
6871
"ipython>=9.2.0",
6972
]
7073
examples = [

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.