name: Build
on: [push]
jobs:
  extras:
    # Run coverage and extra tests only once
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-python@v1
        with:
          python-version: 3.8
      - run: pip install --upgrade pip
      - run: make install
      - run: make pycodestyle
      - run: make test-cover
      - run: make codecov-upload
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_REPO_TOKEN }}
      - run: make test-dist
  test:
    # Run core HTTPie tests everywhere
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest, windows-latest]
        python-version: [3.6, 3.7, 3.8]
        exclude:
          - os: windows-latest
            python-version: 3.8
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - run: python -m pip install --upgrade pip
      - run: pip install --upgrade --editable .
      - run: python setup.py test

name: Build
on: [push, pull_request]
jobs:
  extras:
    # Run coverage and extra tests only once
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-python@v1
        with:
          python-version: 3.8
      - run: pip install --upgrade pip
      - run: make install
      - run: make pycodestyle
      - run: make test-cover
      - run: make codecov-upload
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_REPO_TOKEN }}
      - run: make test-dist
  test:
    # Run core HTTPie tests everywhere
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macOS-latest, windows-latest]
        python-version: [3.6, 3.7, 3.8]
        exclude:
          - os: windows-latest
            python-version: 3.8
    steps:
      - uses: actions/checkout@v1
      - uses: actions/setup-python@v1
        with:
          python-version: ${{ matrix.python-version }}
      - run: python -m pip install --upgrade pip
      - run: pip install --upgrade --editable .
      - run: python setup.py test

Build on PRs as well
Build on PRs as well
