Skip to content

Commit

Permalink
Reintroduce Python for pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainKoszyk committed Oct 26, 2023
1 parent 5b69e57 commit 1ccf268
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@ jobs:
- name: Setup Environment
run: |
echo "NODE_VERSION=18.18.0" >> $GITHUB_ENV
echo "PYTHON_VERSION=$(cat .tool-versions | grep -Po '(?<=python ).*')" >> $GITHUB_ENV
if [ $GITHUB_REF == 'refs/heads/master' ]; then echo "ENV=prod"; else echo "ENV=staging"; fi >> $GITHUB_ENV
echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*\/}" >> $GITHUB_ENV
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Store python version details for cache
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> "$GITHUB_ENV"

- name: Pre-commit installation cache
uses: actions/cache@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ruby 3.2.2
nodejs 18.18.0
python 3.9.12

0 comments on commit 1ccf268

Please sign in to comment.