Skip to content

Add workflow to test PyBaMM develop branch nightly #291

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

Merged
merged 14 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
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
48 changes: 48 additions & 0 deletions .github/workflows/nightly_dependency_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Nightly dependencies at develop

on:
workflow_dispatch:
schedule:
- cron: "0 23 * * 1"

concurrency:
# github.workflow: name of the workflow, so that we don't cancel other workflows
# github.run_id || github.event_name: either the unique identifier for the job or the event that triggered it
group: ${{ github.workflow }}-${{ github.run_id || github.event_name }}
# Cancel in-progress runs when a new workflow with the same group name is triggered
cancel-in-progress: true

jobs:
nightly_tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
python-version: ["3.12"]
suite: ["unit", "integration", "examples"]

name: Test-${{ matrix.os }}-py-${{ matrix.python-version }}-${{ matrix.suite }})

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 "pybamm[all] @ git+https://github.com/pybamm-team/PyBaMM@develop"


- name: Run ${{ matrix.suite }} tests
run: |
if [ ${{ matrix.suite }} == "unit"]; then
python -m pytest --unit
elif [ ${{ matrix.suite }} == "integration"]; then
python -m pytest --integration
elif [ ${{ matrix.suite }} == "examples"]; then
python -m pytest --nbmake --examples
fi
2 changes: 1 addition & 1 deletion .github/workflows/test_on_push.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyBOP
name: Pull Request

on:
workflow_dispatch:
Expand Down