diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..96681a36 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,31 @@ +name: CI + +on: [push, pull_request] + +jobs: + pre-commit: + runs-on: ubuntu-22.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Define python + run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV + + - name: Install python version + uses: gabrielfalcao/pyenv-action@v11 + with: + default: "${{ env.PYTHON_VERSION }}" + command: pip install -U pip + + - name: Show python version + run: python --version + + - name: Install dependencies + run: | + pip install pre-commit + pre-commit install + + - name: Run pre-commit + run: SKIP=stack-yml-generated-is-valid pre-commit run --all-files