name: Lint Python

on:
  push:
    branches:
      - master
    paths:
      - '**.yml'
      - docs/**
  pull_request:
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  lint-python:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
        
    - uses: actions/setup-python@v4
      with:
        python-version: '3.10' 

    - name: Run tests
      run: |
        pip install -r maint/requirements.txt
        make -C maint check
