Skip to content

split tests, update pytest call for windows #7

split tests, update pytest call for windows

split tests, update pytest call for windows #7

name: Nightly dependencies@develop
on:
workflow_dispatch:
push:
concurrency:
# github.workflow: name of the workflow, so that we don't cancel other workflows
# github.event.pull_request.number || github.ref: pull request number or branch name if not a pull request
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Cancel in-progress runs when a new workflow with the same group name is triggered
# This avoids workflow runs on both pushes and PRs
cancel-in-progress: true
jobs:
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Check formatting with pre-commit
run: |
python -m pip install pre-commit
pre-commit run ruff
Tests:
needs: style
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
# Include MacOS M-series Runners
include:
- os: macos-14
python-version: "3.10"
- os: macos-14
python-version: "3.11"
- os: macos-14
python-version: "3.12"
name: Test Suite (${{ matrix.os }} / Python ${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- 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 -e .[all,dev]
python -m pip uninstall -y pybamm
python -m pip install git+https://github.com/pybamm-team/PyBaMM.git@develop
python -m pip install pybtex
- name: Run unit tests
run: |
python -m pytest --unit
- name: Run integtration tests
run: |
python -m pytest --integration
- name: Run examples tests
run: |
python -m pytest --nbmake --examples