name: Checks
on: [push, pull_request]

jobs:
  checks:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
        - python-version: 3.9
          env:
            TOXENV: security
        - python-version: 3.9
          env:
            TOXENV: flake8
        - python-version: 3.9
          env:
            TOXENV: pylint
        - python-version: 3.8  # Keep in sync with .readthedocs.yml
          env:
            TOXENV: docs

    steps:
    - uses: actions/checkout@v2

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

    - name: Run check
      env: ${{ matrix.env }}
      run: |
        pip install -U tox
        tox

name: Checks
on: [push, pull_request]

jobs:
  checks:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
        - python-version: 3.9
          env:
            TOXENV: security
        - python-version: 3.9
          env:
            TOXENV: flake8
        - python-version: 3.9
          env:
            TOXENV: pylint
        - python-version: 3.8  # Keep in sync with .readthedocs.yml
          env:
            TOXENV: docs
          system-libraries:
          - gs

    steps:
    - uses: actions/checkout@v2

    - name: Install system libraries
      if: matrix.system-libraries
      run: |
        sudo apt-get update
        sudo apt-get install ${{ join(matrix.python-version, " ") }}

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

    - name: Run check
      env: ${{ matrix.env }}
      run: |
        pip install -U tox
        tox

Install GhostScript for the documentation
CI: Install GhostScript for the documentation
