Skip to content

More robust is_used for pre-commit (#51) #60

More robust is_used for pre-commit (#51)

More robust is_used for pre-commit (#51) #60

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches: ['main', 'develop']
pull_request:
jobs:
tests:
runs-on: ${{ matrix.os }}
env:
PYTHONIOENCODING: utf-8
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup git user config
run: |
git config --global user.name placeholder
git config --global user.email [email protected]
- name: "Set up uv"
uses: astral-sh/setup-uv@f3bcaebff5eace81a1c062af9f9011aae482ca9d # v3.1.7
with:
version: "latest"
- name: "Set up Python"
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ matrix.python-version }}
- name: Setup dependencies
run: |
uv export --resolution ${{ matrix.resolution }} > requirements.txt
uv pip install --system --break-system-packages -r requirements.txt
- name: Run pre-commit
run: |
uv run --frozen pre-commit run --all-files
- name: Run pytest
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507 # v2.2.0
with:
custom-arguments: tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.12, 3.13]
resolution: [highest, lowest-direct]