Added comprehensive testing for visualization components #22
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Visualization Tests | |
on: | |
push: | |
branches: [ main, master, dev ] | |
pull_request: | |
branches: [ main, master, dev ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install pytest pytest-mock pytest-cov | |
python -m pip install -e .[dev,viz] | |
- name: Run visualization tests | |
run: | | |
pytest -xvs tests/test_visualization_components.py | |
- name: Run visualization benchmarks | |
run: | | |
pytest -xvs tests/test_visualization_components.py::test_performance_benchmarks | |
- name: Generate test coverage report | |
run: | | |
pytest --cov=mesa.visualization tests/test_visualization_components.py --cov-report=xml | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: visualization | |
name: viz-coverage |