name: code format

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  pre-commit:

    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest]
        python-version: ['3.10']
        requires: ['latest']

    steps:
    - name: Check out repository
      uses: actions/checkout@v4

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

    - name: Install and run pre-commit hooks
      uses: pre-commit/action@v3.0.1
