diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index ce8a2a3..01dc0d7 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -81,10 +81,14 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.12 - cache: 'pip' + + - name: Set up uv + uses: yezz123/setup-uv@v4 + with: + uv-venv: ".venv" - name: Install nox - run: python -m pip install nox + run: uv pip install nox[uv] - name: Check if the documentation can be built run: nox -s docs @@ -109,14 +113,17 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Set up uv + uses: yezz123/setup-uv@v4 + with: + uv-venv: ".venv" + - name: Install cookiecutter and pipx - run: python -m pip install cookiecutter pipx + run: uv pip install cookiecutter nox[uv] - name: Generate a project using cookiecutter run: cookiecutter . --no-input - name: Install nox and test generated project working-directory: ./pybamm-example-project - run: | - pipx install nox - pipx run nox -s generated-project-tests + run: nox -s generated-project-tests diff --git a/{{cookiecutter.project_name}}/.github/workflows/test_on_push.yml b/{{cookiecutter.project_name}}/.github/workflows/test_on_push.yml index 634de3f..a3b6d6e 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/test_on_push.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/test_on_push.yml @@ -81,10 +81,14 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.12 - cache: 'pip' + + - name: Set up uv + uses: yezz123/setup-uv@v4 + with: + uv-venv: ".venv" - name: Install nox - run: python -m pip install nox + run: uv pip install nox[uv] - name: Check if the documentation can be built run: nox -s docs