name: "Execute tests"

on:
  push:
  pull_request:

jobs:
  Test:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        python-version: [2.7, 3.5, 3.6, 3.7, 3.8]

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout
        uses: actions/checkout@v2

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

      - name: Install
        run: pip install -e '.[test]'

      - name: Lint
        run: flake8

      - name: Unit tests
        run: pytest --cov

      - name: Upload coverage to codecov
        uses: codecov/codecov-action@v1

      - name: Local integration tests
        run: pytest -m local
        if: ${{ matrix.os != 'windows-latest' }}

      - name: Docker ingration tests
        run: pytest -m docker
        if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' }}

name: "Execute tests"

on:
  push:
  pull_request:

jobs:
  Test:
    strategy:
      matrix:
        os: [ubuntu-latest]
        python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
        include:
          - os: macos-latest
            python-version: 3.8
          - os: windows-latest
            python-version: 3.8

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout
        uses: actions/checkout@v2

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

      - name: Install
        run: pip install -e '.[test]'

      - name: Lint
        run: flake8

      - name: Unit tests
        run: pytest --cov

      - name: Upload coverage to codecov
        uses: codecov/codecov-action@v1

      - name: Local integration tests
        run: pytest -m local
        if: ${{ matrix.os != 'windows-latest' }}

      - name: Docker ingration tests
        run: pytest -m docker
        if: ${{ matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' }}

Test Python 3.8 on all platforms, and other Python versions on Ubuntu only.
Test Python 3.8 on all platforms, and other Python versions on Ubuntu only.
