Skip to content

chore(deps-dev): update pytest-cov requirement from >=6.0,<6.4 to >=6.0,<7.1 #590

chore(deps-dev): update pytest-cov requirement from >=6.0,<6.4 to >=6.0,<7.1

chore(deps-dev): update pytest-cov requirement from >=6.0,<6.4 to >=6.0,<7.1 #590

Workflow file for this run

name: pre-commit
on:
workflow_dispatch:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0 # Full history for diffing
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065
with:
python-version: '3.x'
- name: Install Pre-Commit
run: pip install pre-commit
- name: Determine Changed Files or Full Scan
id: changed-files
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "Running from workflow_dispatch. Scanning entire repo."
git ls-files > files.txt
else
echo "Running from pull_request. Checking changed files only."
BASE_BRANCH=${{ github.base_ref }}
git fetch origin $BASE_BRANCH --depth=1
git diff --name-only origin/$BASE_BRANCH HEAD > files.txt
fi
if [ -s files.txt ]; then
{
echo "CHANGED_FILES<<EOF"
cat files.txt
echo "EOF"
} >> $GITHUB_ENV
else
echo "No changed files."
echo "CHANGED_FILES=" >> $GITHUB_ENV
fi
- name: Run Pre-Commit Hooks
run: |
if [ -n "${{ env.CHANGED_FILES }}" ]; then
echo "Running pre-commit on:"
echo "${{ env.CHANGED_FILES }}"
echo "${{ env.CHANGED_FILES }}" | tr '\n' '\0' | xargs -0 pre-commit run --files
else
echo "No changed files to check."
fi