name: CI

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        env:
          BEANSTALKD_VERSION: 1.12
        run: |
          wget https://github.com/beanstalkd/beanstalkd/archive/v${BEANSTALKD_VERSION}.tar.gz
          tar -xzvf v${BEANSTALKD_VERSION}.tar.gz
          pushd beanstalkd-${BEANSTALKD_VERSION} && make && sudo make install && popd
          pip install -r requirements.txt
          pip install codecov
      - name: Run tests
        run: make test
      - name: Send coverage report to Codecov
        run: codecov

name: CI

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.9, 3.8, 3.7, 3.6, 3.5]
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install dependencies
        env:
          BEANSTALKD_VERSION: 1.12
        run: |
          wget https://github.com/beanstalkd/beanstalkd/archive/v${BEANSTALKD_VERSION}.tar.gz
          tar -xzvf v${BEANSTALKD_VERSION}.tar.gz
          pushd beanstalkd-${BEANSTALKD_VERSION} && make && sudo make install && popd
          pip install -r requirements.txt
      - name: Run tests
        run: make test
      - name: Send coverage report to Codecov
        if: strategy.job-index == 0
        run: |
          pip install codecov
          codecov

Update CI to only send one coverage report
Update CI to only send one coverage report
