name: tests

on:
  push:
    branches-ignore:
    - 'wip-*'
    paths-ignore:
    - 'docs/**'
  pull_request:
    branches-ignore:
    - 'wip-*'
    paths-ignore:
    - 'docs/**'

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      max-parallel: 6
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python: [2.7, 3.6, 3.7, 3.8, pypy2, pypy3]

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

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install nose codecov

    - name: Test with Python ${{ matrix.python }} on ${{ matrix.os }}
      run: python setup.py -q nosetests

    - name: Report coverage
      run: |
        coverage run --source=mistune setup.py -q nosetests
        coverage xml

    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1.0.14
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        file: ./coverage.xml
        flags: unittests
        name: GitHub

name: tests

on:
  push:
    branches-ignore:
    - 'wip-*'
    paths-ignore:
    - 'docs/**'
  pull_request:
    branches-ignore:
    - 'wip-*'
    paths-ignore:
    - 'docs/**'

jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      max-parallel: 6
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python: [2.7, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]

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

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install nose codecov

    - name: Test with Python ${{ matrix.python }} on ${{ matrix.os }}
      run: python setup.py -q nosetests

    - name: Report coverage
      run: |
        coverage run --source=mistune setup.py -q nosetests
        coverage xml

    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1.0.14
      with:
        token: ${{ secrets.CODECOV_TOKEN }}
        file: ./coverage.xml
        flags: unittests
        name: GitHub

Add Python 3.9 to test runner
Add Python 3.9 to test runner
