name: CI

on:
  - pull_request

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.x

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install black==22.10.0

      - name: Check formatting
        run: |
          black --check .

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version:
          - 3.7
          - 3.8
          - 3.9
          - "3.10"
          - pypy-3.7
          - pypy-3.8
    steps:
      - uses: actions/checkout@v2

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

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt -r requirements-dev.txt
          pip install coveralls

      - name: Run tests
        run: |
          coverage run -m pytest

      - name: Report coverage
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          coveralls --service=github

name: CI

on:
  - pull_request

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: 3.x

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install black==22.10.0

      - name: Check formatting
        run: |
          black --check .

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version:
          - 3.7
          - 3.8
          - 3.9
          - "3.10"
          - pypy-3.7
          - pypy-3.8
    steps:
      - uses: actions/checkout@v3

      - name: Setup Python
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt -r requirements-dev.txt
          pip install coveralls

      - name: Run tests
        run: |
          coverage run -m pytest

      - name: Report coverage
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          coveralls --service=github

Update to action versions on supported Node
Update to action versions on supported Node

Node 12 has been unsupported for quite a while and GitHub is [pushing to
update all actions to use Node 16][1]. This change updates actions to
versions that run on the supported version of Node.

[1]: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
