Skip to content

Update dependencies: black, gitleaks, markdownlint-cli, and checkout #1

Update dependencies: black, gitleaks, markdownlint-cli, and checkout

Update dependencies: black, gitleaks, markdownlint-cli, and checkout #1

Workflow file for this run

name: Pre-Commit
on:
pull_request:
branches:
- main
- dev
types:
- opened
- synchronize
- reopened
jobs:
pre-commit:
name: Run pre-commit checks
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: "3.10"
- name: Cache pip
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt') }}
- name: Install pre-commit and dependencies
run: |
python -m pip install -U pip
python -m pip install -r ./requirements.txt
python -m pip install -U pre-commit pyright pytest
- name: Cache pre-commit
uses: actions/cache@v6
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit on all files
run: |
pre-commit run --all-files --show-diff-on-failure --color=always