name: CI

on: [push, pull_request, workflow_dispatch]

jobs:
  pre-commit:
    name: Run pre-commit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - uses: pre-commit/action@v2.0.0

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10']
      fail-fast: false
    needs: pre-commit

    steps:
      - uses: actions/checkout@v2

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

      - name: Install dependencies
        run: |
          pip install -e .
          spacy download en_core_web_sm
          pip install pre-commit pytest

      - name: Run tests
        run: |
          pytest

name: CI

on: [push, pull_request, workflow_dispatch]

jobs:
  pre-commit:
    name: Run pre-commit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
      - uses: pre-commit/action@v2.0.0

  test:
    name: Tests for Python ${{ matrix.python-version }
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ['3.7', '3.8', '3.9', '3.10']
      fail-fast: false
    needs: pre-commit

    steps:
      - uses: actions/checkout@v2

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

      - name: Install dependencies
        run: |
          pip install -e .
          spacy download en_core_web_sm
          pip install pre-commit pytest

      - name: Run tests
        run: |
          pytest

Add name to CI test runs
Add name to CI test runs
