Skip to content

Commit

Permalink
Install nox with pip instead of pipx
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal committed Nov 20, 2023
1 parent 7537c73 commit 0aa469b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/run_periodic_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ jobs:
if: matrix.os == 'windows-latest'
run: choco install graphviz --version=2.38.0.20190211

- name: Install nox
run: python -m pip install nox

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
if: matrix.os != 'windows-latest'
run: pipx run nox -s pybamm-requires
run: python -m nox -s pybamm-requires

- name: Run unit tests for GNU/Linux with Python 3.8, 3.9, and 3.10, and for macOS and Windows with all Python versions
if: (matrix.os == 'ubuntu-latest' && matrix.python-version != 3.11) || (matrix.os != 'ubuntu-latest')
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install nox
run: python -m pip install nox

- name: Cache pybamm-requires nox environment for GNU/Linux and macOS
uses: actions/cache@v3
if: matrix.os != 'windows-latest'
Expand All @@ -106,7 +109,7 @@ jobs:

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
if: matrix.os != 'windows-latest'
run: pipx run nox -s pybamm-requires
run: python -m nox -s pybamm-requires

- name: Run unit tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
run: python -m nox -s unit
Expand Down Expand Up @@ -144,6 +147,9 @@ jobs:
python-version: 3.11
cache: 'pip'

- name: Install nox
run: python -m pip install nox

- name: Cache pybamm-requires nox environment for GNU/Linux
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -222,6 +228,9 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Install nox
run: python -m pip install nox

- name: Cache pybamm-requires nox environment for GNU/Linux and macOS
uses: actions/cache@v3
if: matrix.os != 'windows-latest'
Expand All @@ -238,7 +247,7 @@ jobs:

- name: Install SuiteSparse and SUNDIALS on GNU/Linux and macOS
if: matrix.os != 'windows-latest'
run: pipx run nox -s pybamm-requires
run: python -m nox -s pybamm-requires

- name: Run integration tests for ${{ matrix.os }} with Python ${{ matrix.python-version }}
run: python -m nox -s integration
Expand Down Expand Up @@ -277,6 +286,9 @@ jobs:
python-version: 3.11
cache: 'pip'

- name: Install nox
run: python -m pip install nox

- name: Install docs dependencies and run doctests for GNU/Linux with Python 3.11
run: python -m nox -s doctests

Expand Down Expand Up @@ -316,6 +328,9 @@ jobs:
python-version: 3.11
cache: 'pip'

- name: Install nox
run: python -m pip install nox

- name: Cache pybamm-requires nox environment for GNU/Linux
uses: actions/cache@v3
with:
Expand All @@ -333,7 +348,7 @@ jobs:
run: python -m nox -s pybamm-requires

- name: Run example notebooks tests for GNU/Linux with Python 3.11
run: pipx run nox -s examples
run: python -m nox -s examples

# Runs only on Ubuntu with Python 3.11
run_scripts_tests:
Expand Down Expand Up @@ -368,6 +383,9 @@ jobs:
python-version: 3.11
cache: 'pip'

- name: Install nox
run: python -m pip install nox

- name: Cache pybamm-requires nox environment for GNU/Linux
uses: actions/cache@v3
with:
Expand All @@ -385,4 +403,4 @@ jobs:
run: python -m nox -s pybamm-requires

- name: Run example scripts tests for GNU/Linux with Python 3.11
run: pipx run nox -s scripts
run: python -m nox -s scripts

0 comments on commit 0aa469b

Please sign in to comment.