name: CI

on:
  push:
    branches: [ '*' ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7, 3.8, 3.9]
        marker: [unit or asynchronous]
        include:
          - python-version: 3.9
            marker: 'unit or integration or asynchronous'
          - python-version: "3.10"
            marker: 'unit or integration'
    steps:
    - uses: actions/checkout@v2
    - name: Cache dependencies
      uses: actions/cache@v1
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('requirements/**') }}
        restore-keys: |
          ${{ runner.os }}-pip-
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel
        pip install -r requirements/ci.txt
    - name: Start services
      run: |
        make setup-test-backends
    - name: Tests
      run: |
        py.test -m "${{ matrix.marker || 'unit' }}" --cov-report=xml
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1

name: CI

on:
  push:
    branches: [ '*' ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.7, 3.8, 3.9]
        marker: [unit or asynchronous]
        include:
          - python-version: 3.9
            marker: 'unit or integration or asynchronous'
          - python-version: "3.10"
            marker: 'unit or integration'
    steps:
    - uses: actions/checkout@v2
    - name: Cache dependencies
      uses: actions/cache@v1
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('requirements/**') }}
        restore-keys: |
          ${{ runner.os }}-pip-
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel
        pip install -r requirements/ci.txt
    - name: Start services
      run: |
        make setup-test-backends
    - name: Tests
      run: |
        py.test -m "${{ matrix.marker || 'unit' }}" --cov-report=xml --cov-branch
    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v1

Add branch coverage to CI
Add branch coverage to CI
