name: Check

on:
  - push
  - pull_request

jobs:
  build:
    name: ${{ matrix.tox-environment }}
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        tox-environment:
          - docs
          - examples
          - lint

    env:
      TOXENV: ${{ matrix.tox-environment }}

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3'
          cache: pip

      - name: Install dependencies
        run: python -m pip install tox

      - name: Run
        run: tox

name: Check

on:
  - push
  - pull_request

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

jobs:
  build:
    name: ${{ matrix.tox-environment }}
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        tox-environment:
          - docs
          - examples
          - lint

    env:
      TOXENV: ${{ matrix.tox-environment }}

    steps:
      - uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3'
          cache: pip

      - name: Install dependencies
        run: python -m pip install tox

      - name: Run
        run: tox

Interrupt the concurrent builds on subsequent pushes
Interrupt the concurrent builds on subsequent pushes
