Skip to content

Commit

Permalink
Revert "fix: get poetry to use the same python version as pre-commit"
Browse files Browse the repository at this point in the history
This reverts commit 7566816.
  • Loading branch information
tagoro9 committed Oct 25, 2023
1 parent 813c287 commit 01fe78f
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,13 @@ runs:
# This will set an environment variable we can use to conditionally
# install pre-commit if needed and toggle how the action runs.
echo "PRE_COMMIT_BIN=$(command -v pre-commit)" >> $GITHUB_ENV
- name: Find poetry
shell: bash
run: |
# Finding poetry
# This will set an environment variable we can use to conditionally
# install poetry.
echo "POETRY_BIN=$(command -v poetry)" >> $GITHUB_ENV
- name: Find python
shell: bash
run: |
# Finding python
# This will set an environment variable we can use to conditionally
# install python.
echo "PYTHON_BIN=$(command -v python)" >> $GITHUB_ENV
echo "PYTHON_VERSION_SET=$(pyenv version-name)" >> $GITHUB_ENV
#add as debug the python versions and
- name: Setup python
# Only run this if we don't already have a pre-commit on the PATH
if: env.PYTHON_BIN == null
Expand Down Expand Up @@ -174,17 +165,11 @@ runs:
uses: pre-commit/action@v3.0.0
with:
extra_args: ${{ env.PRE_COMMIT_FILES }}
- name: Set poetry env to match python version
if: env.POETRY_BIN != null
shell: bash
run: |
poetry env use ${{ env.PYTHON_VERSION_SET }}
- name: Pre-commit
# Run pre-commit directly if we found it on the PATH
if: env.PRE_COMMIT_BIN != null
shell: bash
run: |
pre-commit run --show-diff-on-failure --color=always ${{ env.PRE_COMMIT_FILES }}
run: pre-commit run --show-diff-on-failure --color=always ${{ env.PRE_COMMIT_FILES }}
- name: Clean up
# Delete the python version file if we created it
if: steps.create-python-version-file.outputs.file-created == 'true'
Expand Down

0 comments on commit 01fe78f

Please sign in to comment.