forked from pybop-team/PyBOP
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (41 loc) · 1.61 KB
/
nightly_dependency_tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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