Update continuous integration workflows #23
Workflow file for this run
This file contains 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: Test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '43 4 3 * *' # 4:43a on third day of the month | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
if: | |
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- name: Install NetLogo | |
run: | | |
curl https://ccl.northwestern.edu/netlogo/6.1.1/NetLogo-6.1.1-64.tgz --output NetLogo-6.1.1-64.tgz | |
tar xf NetLogo-6.1.1-64.tgz | |
mv NetLogo\ 6.1.1 /opt/netlogo-6.1.1 | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install nox | |
run: pip install nox | |
- name: Test | |
run: | | |
nox -s test --python ${{ matrix.python-version }} | |
# Runs, passes all tests, but hangs at the end. This is https://github.com/csdms/bmi-example-pynetlogo/issues/1. | |
# - name: Test BMI | |
# run: | | |
# nox -s test-bmi --python ${{ matrix.python-version }} | |
- name: Run examples | |
run: | | |
nox -s run-examples --python ${{ matrix.python-version }} | |
- name: Check Jupyter notebooks | |
if: ${{ matrix.python-version == '3.12' }} | |
run: | | |
nox -s check-notebooks --python="${{ matrix.python-version }}" |