diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da3d729..e0e2a9f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,18 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: psf/black@stable - - check-file-headers: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: 3.12 - - name: Check header - run: python ./check_header.py - shell: bash + - uses: pre-commit/action@v3.0.1 test: runs-on: ${{ matrix.os }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..2cafa89 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,15 @@ +--- +repos: + - repo: https://github.com/psf/black-pre-commit-mirror + rev: 24.10.0 + hooks: + - id: black + - repo: local + hooks: + - id: check-headers + name: check headers + language: script + entry: check_header.py + pass_filenames: false + require_serial: true + types: [python]