@@ -48,22 +48,13 @@ runs:
48
48
# This will set an environment variable we can use to conditionally
49
49
# install pre-commit if needed and toggle how the action runs.
50
50
echo "PRE_COMMIT_BIN=$(command -v pre-commit)" >> $GITHUB_ENV
51
- - name : Find poetry
52
- shell : bash
53
- run : |
54
- # Finding poetry
55
- # This will set an environment variable we can use to conditionally
56
- # install poetry.
57
- echo "POETRY_BIN=$(command -v poetry)" >> $GITHUB_ENV
58
51
- name : Find python
59
52
shell : bash
60
53
run : |
61
54
# Finding python
62
55
# This will set an environment variable we can use to conditionally
63
56
# install python.
64
57
echo "PYTHON_BIN=$(command -v python)" >> $GITHUB_ENV
65
- echo "PYTHON_VERSION_SET=$(pyenv version-name)" >> $GITHUB_ENV
66
- #add as debug the python versions and
67
58
- name : Setup python
68
59
# Only run this if we don't already have a pre-commit on the PATH
69
60
if : env.PYTHON_BIN == null
@@ -174,17 +165,11 @@ runs:
174
165
uses : pre-commit/action@v3.0.0
175
166
with :
176
167
extra_args : ${{ env.PRE_COMMIT_FILES }}
177
- - name : Set poetry env to match python version
178
- if : env.POETRY_BIN != null
179
- shell : bash
180
- run : |
181
- poetry env use ${{ env.PYTHON_VERSION_SET }}
182
168
- name : Pre-commit
183
169
# Run pre-commit directly if we found it on the PATH
184
170
if : env.PRE_COMMIT_BIN != null
185
171
shell : bash
186
- run : |
187
- pre-commit run --show-diff-on-failure --color=always ${{ env.PRE_COMMIT_FILES }}
172
+ run : pre-commit run --show-diff-on-failure --color=always ${{ env.PRE_COMMIT_FILES }}
188
173
- name : Clean up
189
174
# Delete the python version file if we created it
190
175
if : steps.create-python-version-file.outputs.file-created == 'true'
0 commit comments