name: Lint code

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

permissions:
  contents: read

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
      with:
        persist-credentials: false
    - name: Set up Python 3.10
      uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
      with:
        python-version: "3.10"
    - name: Run pre-commit
      uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
