diff --git a/.github/workflows/pre-commit-autoupdate.yml b/.github/workflows/pre-commit-autoupdate.yml index 30fcf2b1..7760d054 100644 --- a/.github/workflows/pre-commit-autoupdate.yml +++ b/.github/workflows/pre-commit-autoupdate.yml @@ -12,12 +12,32 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: browniebroke/pre-commit-autoupdate-action@main - - uses: peter-evans/create-pull-request@v3 + + - name: Configure Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Use Pip cache if available + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip3-${{ hashFiles('*requirements.txt') }} + - name: Install wheel package + run: pip install wheel + + - name: Install dependencies (including pytype) + # needed to install pytype + run: pip install -e .[dev] + + - name: Update and validate pre-commit updates + uses: browniebroke/pre-commit-autoupdate-action@main + + - name: Create Pull request with pre-commit updates + uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.GITHUB_TOKEN }} branch: update/pre-commit-hooks title: Update pre-commit hooks - commit-message: "chore: update pre-commit hooks" + commit-message: "CI: update pre-commit hooks" body: Update versions of pre-commit hooks to latest version.