Skip to content

Commit

Permalink
ci: Add tests for mesa-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jan 11, 2024
1 parent 1d48db5 commit e196cea
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,36 @@ jobs:
- if: matrix.os == 'ubuntu'
name: Codecov
uses: codecov/codecov-action@v3

test_examples:
runs-on: ubuntu-latest
- 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

0 comments on commit e196cea

Please sign in to comment.