name: Lint code

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

permissions:
  contents: read

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
      with:
        persist-credentials: false
    - name: Set up Python 3.10
      uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
      with:
        python-version: "3.10"
    - name: Run pre-commit
      uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507
