diff --git a/.github/workflows/test_on_push.yml b/.github/workflows/test_on_push.yml index 5f34126..ae8217d 100644 --- a/.github/workflows/test_on_push.yml +++ b/.github/workflows/test_on_push.yml @@ -100,42 +100,42 @@ jobs: run: nox -s docs -generated_project_tests: - needs: [style] - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, macos-13, macos-14, windows-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] - backend: [hatch, setuptools] - vcs: [true, false] - - name: Generated Project Tests (${{ matrix.os }} / Python ${{ matrix.python-version }} / Backend ${{ matrix.backend }} / VCS ${{ matrix.vcs }}) - - steps: - - name: Checkout pybamm-cookiecutter - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install copier and jinja2_time - run: python -m pip install copier jinja2_time - - - name: Generate project - run: | - copier copy . ../pybamm-${{ matrix.backend }}-${{ matrix.vcs }} --data project_name=pybamm-${{ matrix.backend }}-${{ matrix.vcs }} --data project_slug=pybamm_${{ matrix.backend }}_${{ matrix.vcs }} --data backend=${{ matrix.backend }} --data vcs=${{ matrix.vcs }} --trust --defaults - - - name: Set up uv - uses: yezz123/setup-uv@v4 - with: - uv-venv: ".venv" - - - name: Install nox - uses: wntrblm/nox@2024.04.15 - - - name: Test the generated project - run: nox -s generated-project-tests --working-directory=../pybamm-${{ matrix.backend }}-${{ matrix.vcs }} + generated_project_tests: + needs: [style] + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-13, macos-14, windows-latest] + python-version: ["3.9", "3.10", "3.11", "3.12"] + backend: [hatch, setuptools] + vcs: [true, false] + + name: Generated Project Tests (${{ matrix.os }} / Python ${{ matrix.python-version }} / Backend ${{ matrix.backend }} / VCS ${{ matrix.vcs }}) + + steps: + - name: Checkout pybamm-cookiecutter + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install copier and jinja2_time + run: python -m pip install copier jinja2_time + + - name: Generate project + run: | + copier copy . ../pybamm-${{ matrix.backend }}-${{ matrix.vcs }} --data project_name=pybamm-${{ matrix.backend }}-${{ matrix.vcs }} --data project_slug=pybamm_${{ matrix.backend }}_${{ matrix.vcs }} --data backend=${{ matrix.backend }} --data vcs=${{ matrix.vcs }} --trust --defaults + + - name: Set up uv + uses: yezz123/setup-uv@v4 + with: + uv-venv: ".venv" + + - name: Install nox + uses: wntrblm/nox@2024.04.15 + + - name: Test the generated project + run: nox -s generated-project-tests --working-directory=../pybamm-${{ matrix.backend }}-${{ matrix.vcs }}