From b98d6b79e40e2db0bec8c1c7c03a6d17ea3700ff Mon Sep 17 00:00:00 2001 From: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Date: Mon, 25 Mar 2024 07:20:52 +0530 Subject: [PATCH] Add and debug PyBaMM test suite --- .github/workflows/test_suite.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test_suite.yml diff --git a/.github/workflows/test_suite.yml b/.github/workflows/test_suite.yml new file mode 100644 index 0000000000..9452e96524 --- /dev/null +++ b/.github/workflows/test_suite.yml @@ -0,0 +1,39 @@ +name: PyBaMM wheel tests + +on: + workflow_dispatch: + pull_request: + +env: + FORCE_COLOR: 3 + +jobs: + run_unit_tests: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.11"] + name: test-suite-${{ matrix.os }}-pybamm-24.1-${{ matrix.python-version }} + + steps: + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install PyBaMM via wheels + run: python -m pip install "pybamm[all,jax,dev]==24.1" + + - name: Checkout tests from PyBaMM repository + uses: actions/checkout@v4 + with: + repository: pybamm-team/PyBaMM + ref: 'v24.1' + sparse-checkout: | + tests + sparse-checkout-cone-mode: true + + - name: Run unit tests and integration tests with unittest + run: python -m unittest discover -s tests --verbose