# This workflow will install Python dependencies, run tests and converage with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Run tests

on:
  [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]

    steps:
    - uses: actions/checkout@v2

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

    - name: Upgrade pip
      run: |
        python -m pip install --upgrade pip

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

    - name: Test with coverage
      run: |
        python sh.py travis
        python -m flake8 sh.py test.py
        if python -c 'import sys; sys.exit(int(not sys.version_info >= (3, 5)))' ; then python setup.py check --restructuredtext --metadata --strict ; fi

    - name: Report coverage to Coveralls
      uses: AndreMiras/coveralls-python-action@develop

# This workflow will install Python dependencies, run tests and converage with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Run tests

on:
  [push]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]

    steps:
    - uses: actions/checkout@v2

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

    - name: Upgrade pip
      run: |
        python -m pip install --upgrade pip

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

    - name: Test with coverage
      run: |
        python sh.py travis
        python -m flake8 sh.py test.py
        if python -c 'import sys; sys.exit(int(not sys.version_info >= (3, 5)))' ; then python setup.py check --restructuredtext --metadata --strict ; fi

    - name: Report coverage to Coveralls
      uses: AndreMiras/coveralls-python-action@develop
      with:
        parallel: true
        flag-name: Unit Test

  coveralls_finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
    - name: Coveralls Finished
      uses: AndreMiras/coveralls-python-action@develop
      with:
        parallel-finished: true

Add final step, and mark unit test steps as parallel
Add final step, and mark unit test steps as parallel
