Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/hooks-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Hooks Tests

on:
push:
branches: [main]
paths: &hook_paths
- 'hooks/**'
- '.github/workflows/hooks-tests.yml'
pull_request:
branches: [main]
paths: *hook_paths

jobs:
test:
name: ${{ matrix.os }} / Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# Hook scripts are stdlib-only and must keep running on 3.9 (ubuntu-24.04: 26.04 has no 3.9).
- os: ubuntu-24.04
python-version: '3.9'
- os: ubuntu-latest
python-version: '3.12'
- os: macos-latest
python-version: '3.12'
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install pytest
run: python -m pip install --upgrade pip pytest

- name: Run hook tests
run: python -m pytest hooks/tests -v
Loading