Skip to content

Commit b0ab5b4

Browse files
authored
CI: Exempt PendingDeprecationWarning from warnings-as-errors
Mesa recently updated its CI to treat warnings as errors while explicitly exempting `PendingDeprecationWarning` per the deprecation policy. This PR mirrors that behavior in mesa-examples. All warnings except `PendingDeprecationWarning` continue to fail CI, preventing warning accumulation and catching issues early, while allowing pending deprecations to surface without breaking example builds.
1 parent 86f1521 commit b0ab5b4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/test_examples.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
# - name: Install dependencies
2828
# run: pip install mesa[network] pytest
2929
# - name: Test with pytest
30-
# run: pytest -rA -Werror test_examples.py
30+
# run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py
3131

3232
build-pre:
3333
runs-on: ubuntu-latest
@@ -42,7 +42,7 @@ jobs:
4242
pip install mesa[network] --pre
4343
pip install .[test]
4444
- name: Test with pytest
45-
run: pytest -rA -Werror -Wdefault::FutureWarning test_examples.py
45+
run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py
4646

4747
build-main:
4848
runs-on: ubuntu-latest
@@ -57,4 +57,4 @@ jobs:
5757
pip install .[test]
5858
pip install -U git+https://github.com/mesa/mesa@main#egg=mesa[network]
5959
- name: Test with pytest
60-
run: pytest -rA -Werror -Wdefault::FutureWarning test_examples.py
60+
run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py

.github/workflows/test_gis_examples.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
# - name: Install dependencies
2828
# run: pip install mesa pytest
2929
# - name: Test with pytest
30-
# run: pytest -rA -Werror test_examples.py
30+
# run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_examples.py
3131

3232
build-pre:
3333
runs-on: ubuntu-latest
@@ -42,7 +42,7 @@ jobs:
4242
pip install mesa-geo --pre
4343
pip install .[test_gis]
4444
- name: Test with pytest
45-
run: pytest -rA -Werror test_gis_examples.py
45+
run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_gis_examples.py
4646

4747
build-main:
4848
runs-on: ubuntu-latest
@@ -57,7 +57,7 @@ jobs:
5757
pip install -U git+https://github.com/mesa/mesa-geo@main#egg=mesa-geo
5858
pip install .[test_gis]
5959
- name: Test with pytest
60-
run: pytest -rA -Werror test_gis_examples.py --cov-report=xml
60+
run: pytest -rA -Werror -Wdefault::PendingDeprecationWarning test_gis_examples.py --cov-report=xml
6161
- name: Codecov
6262
uses: codecov/codecov-action@v5
6363
with:

0 commit comments

Comments
 (0)