name: Run Tests

on: [push]

jobs:
  test:

    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 4
      matrix:
        python-version:
          - 3.5
          - 3.6
          - 3.7
          - 3.8
        os:
          - ubuntu-latest
          - windows-latest
          # - macOS-latest

    steps:
    - uses: actions/checkout@master
    - name: Set up 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-test.txt
    - name: Test with Pytest
      run: pytest
    - name: Upload coverage
      run: codecov -t ${{ secrets.CODECOV_TOKEN }}

name: Run Tests

on: [push]

jobs:
  test:

    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 4
      matrix:
        python-version:
          - 3.5
          - 3.6
          - 3.7
          - 3.8
        os:
          - ubuntu-latest
          - windows-latest
          # - macOS-latest

    steps:
    - uses: actions/checkout@master
    - name: Set up 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-test.txt
    - name: Test with Pytest
      run: pytest
    - name: Upload coverage report
      run: codecov
      env:
        # Note: pull requests from forks don't have access to secrets
        # The codecov CLI degrades nicely when coming from the environment
        # It causes an error if using the -t option
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Change coverage upload step to get token from environments
Change coverage upload step to get token from environments
