Skip to content

Commit

Permalink
rework poetry install
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <[email protected]>
  • Loading branch information
wagoodman committed Feb 11, 2025
1 parent b29239d commit 9f1cdbc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
31 changes: 14 additions & 17 deletions .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,28 +57,25 @@ runs:
with:
python-version: ${{ inputs.python-version }}

- name: Install poetry
- name: Install Poetry
if: inputs.python == 'true'
uses: abatilo/actions-poetry@3765cf608f2d4a72178a9fc5b918668e542b89b1 # v4.0.0
with:
poetry-version: ${{ inputs.poetry-version }}
shell: bash
run: |
pipx install poetry==${{ inputs.poetry-version }}
- name: Cache Poetry virtualenv
uses: actions/[email protected]
if: inputs.python == 'true' && inputs.use-poetry-cache == 'true'
id: cache
- name: Cache Poetry cache
uses: actions/cache@v4
if: inputs.python == 'true'
with:
path: ~/.virtualenvs
key: ${{ inputs.cache-key-prefix }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ inputs.cache-key-prefix }}-
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ inputs.python-version }}-${{ inputs.poetry-version }}

- name: Setup Poetry config
- name: Cache Packages
uses: actions/cache@v4
if: inputs.python == 'true'
shell: bash
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
with:
path: ~/.local
key: poetry-local-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-${{ hashFiles('.github/workflows/*.yml') }}

- name: Bootstrap python dependencies
if: inputs.python == 'true'
Expand Down
2 changes: 1 addition & 1 deletion manager/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ virtual-env-check:
.PHONY: bootstrap
bootstrap: ## Install all dependencies
$(call title,Bootstrapping dependencies)
poetry install
poetry install --no-root


## Static analysis targets #################################
Expand Down

0 comments on commit 9f1cdbc

Please sign in to comment.