Skip to content

Swap out references to pre-commit with prek #2694

Swap out references to pre-commit with prek

Swap out references to pre-commit with prek #2694

Workflow file for this run

name: Linting
on:
push:
branches:
- main
- "renovate/**"
pull_request:
jobs:
lint-this-repo:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Cache prek
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/prek
key: prek-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Set up python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.x"
- name: Install dependencies
run: python -m pip install prek
- name: Run prek
run: prek run --all-files --color always --verbose
lint-the-template:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Cache prek
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/prek
key: prek-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Set up python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.x"
- name: Install dependencies
run: python -m pip install cookiecutter prek
- name: Create template
run: cookiecutter . --no-input --output-dir cookie-template
- name: Run prek
run: |-
git add .
prek run --all-files --color always --verbose
working-directory: cookie-template/python-template
lint-prose:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Run Vale
uses: vale-cli/vale-action@85f9f7f2c5f449ac0ae5b66662961bae3f77ca6a # v2.1.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filter_mode: diff_context
reporter: github-check
version: 3.14.1