Skip to content

Commit 71e0c44

Browse files
author
David Robertson
authored
Install deps and project in one go (#4)
1 parent 387b367 commit 71e0c44

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

action.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,24 +74,27 @@ runs:
7474
# output. We really want to use `poetry lock --check`, but that is only
7575
# available in poetry 1.2.
7676
# https://github.com/python-poetry/poetry/issues/1406
77+
#
78+
# Note that the error message has changed with Poetry 1.2 to
79+
# Warning: poetry.lock is not consistent with pyproject.toml. You may be
80+
# getting improper dependencies. Run poetry lock [--no-update] to fix it.
81+
# So this check fails on Poetry 1.2. But that version of poetry wants to change
82+
# the lockfile to include versions of setuptools for each dependency. So it's
83+
# convenient to leave this as-is, unless we want to change to use Poetry 1.2 by
84+
# default in the future.
7785
run: >-
7886
poetry export --without-hashes | (! grep "The lock file is not up to date") ||
7987
(echo pyproject.toml was updated without running \`poetry lock --no-update\`. && false)
8088
shell: bash
8189

82-
- name: Install base dependencies only
83-
if: steps.poetry-venv-cache.outputs.cache-hit != 'true' && inputs.extras == ''
90+
- name: Install project (no extras)
91+
if: inputs.extras == ''
8492
run: poetry install --no-interaction --no-root
8593
shell: bash
8694

87-
- name: Install poetry with --extras=${{ inputs.extras }}
88-
if: steps.poetry-venv-cache.outputs.cache-hit != 'true' && inputs.extras != ''
89-
run: poetry install --no-interaction --no-root --extras="${{ inputs.extras }}"
90-
shell: bash
91-
92-
# (Not sure if this is needed if there's a cache hit?)
93-
- name: Install project
94-
run: poetry install --no-interaction
95+
- name: Install project with --extras=${{ inputs.extras }}
96+
if: inputs.extras != ''
97+
run: poetry install --no-interaction --extras="${{ inputs.extras }}"
9598
shell: bash
9699

97100
# For debugging---let's just check what we're working with.

0 commit comments

Comments
 (0)