name: Lint code

on: [push, pull_request]

permissions:
  contents: read

jobs:
  lint:
    runs-on: ubuntu-20.04
    timeout-minutes: 10

    steps:
    - uses: actions/checkout@v3
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: "3.x"
    - name: Run pre-commit
      uses: pre-commit/action@v3.0.0
