Fix pre-commit step in CI #1043
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Define python | |
run: | | |
echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV | |
- name: Echo python version | |
run: echo PYTHON_VERSION=${{ env.PYTHON_VERSION }} | |
- name: Install python version | |
uses: gabrielfalcao/pyenv-action@v18 | |
with: | |
default: "${{ env.PYTHON_VERSION }}" | |
command: pip install -U pip | |
- name: Show python version | |
run: python --version | |
- name: Run pre-commit | |
uses: pre-commit/[email protected] |