Skip to content

Commit f9cc0dc

Browse files
ci: enable Poetry cache on template (#749)
* ci: enable Poetry cache Committed via https://github.com/asottile/all-repos * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * ci: install Poetry in copier job * ci: remove Poetry cache on copier job * ci: remove Poetry cache on copier job * ci: debug python versions * ci: remove shell attribute * ci: install Poetry using Python 3.11 * ci: set pipx steps to use Python 3.11 * ci: use built-in output --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent c4007b5 commit f9cc0dc

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,13 @@ jobs:
3030
name: "Template: ${{ matrix.python-version }} - ${{ matrix.os }}"
3131
steps:
3232
- uses: actions/checkout@v4
33+
- name: Install poetry
34+
run: pipx install poetry
3335
- name: Set up Python
3436
uses: actions/setup-python@v5
3537
with:
38+
cache: poetry
3639
python-version: ${{ matrix.python-version }}
37-
- uses: snok/[email protected]
3840
- name: Install Dependencies
3941
run: poetry install
4042
shell: bash
@@ -67,12 +69,11 @@ jobs:
6769
steps:
6870
- uses: actions/checkout@v4
6971
- uses: actions/setup-python@v5
72+
id: setup-python
7073
with:
7174
python-version: "3.11"
72-
- uses: snok/install-poetry@v1
73-
- run: poetry install
7475
- run: |
75-
poetry run copier copy \
76+
pipx run copier copy \
7677
. \
7778
my-project \
7879
--UNSAFE \
@@ -84,13 +85,14 @@ jobs:
8485
--data 'open_source_license=MIT' \
8586
${{ matrix.extra_options.value }} \
8687
--defaults
87-
shell: bash
88+
env:
89+
PIPX_DEFAULT_PYTHON: ${{ steps.setup-python.outputs.python-path }}
8890
- run: cat pyproject.toml
8991
working-directory: my-project
90-
shell: bash
92+
- run: pipx install poetry
93+
env:
94+
PIPX_DEFAULT_PYTHON: ${{ steps.setup-python.outputs.python-path }}
9195
- run: poetry install --with docs
9296
working-directory: my-project
93-
shell: bash
9497
- run: ${{ matrix.script.run }}
9598
working-directory: my-project/${{ matrix.script.dir }}
96-
shell: bash

0 commit comments

Comments
 (0)