Skip to content
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

ci: Add tests for mesa-examples #1956

Merged
merged 1 commit into from
Jan 12, 2024
Merged
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
34 changes: 34 additions & 0 deletions .github/workflows/build_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,37 @@ jobs:
- if: matrix.os == 'ubuntu'
name: Codecov
uses: codecov/codecov-action@v3

examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: test-examples-pip-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}
- name: Install dependencies
# Only if the cache misses
# Based on https://github.com/pypa/pip/issues/8049#issuecomment-633845028
# read_requirements.py should be removed once
# https://github.com/pypa/pip/issues/11440 is resolved.
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install toml
python tests/read_requirements.py > requirements.txt
pip install -r requirements.txt
- name: Install Mesa
run: pip install --no-deps .
- name: Checkout mesa-examples
uses: actions/checkout@v4
with:
repository: projectmesa/mesa-examples
path: mesa-examples
- name: Test examples
run: |
cd mesa-examples
pytest test_examples.py
Loading