name: build

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        name: [ ubuntu ]
        include:
          - name: ubuntu
            os: ubuntu-latest
            python-version: 3.9
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install Poetry
        uses: snok/install-poetry@v1.1.4
        with:
          virtualenvs-create: true
          virtualenvs-in-project: true
      - name: Load cached venv
        id: cached-pip-wheels
        uses: actions/cache@v2
        with:
          path: ~/.cache
          key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
      - name: Upgrade pip
        run: poetry run pip install -U pip
      - name: Install setuptools
        run: poetry run pip install -U setuptools
      - name: Install dependencies
        run: poetry install --no-interaction --no-root
      - name: Install library
        run: poetry install --no-interaction
      - name: Run test suite
        run: |
          source $VENV
          coverage run --source=dribdat -m pytest tests/
      - name: Generate coverage report
        run: |
          source $VENV
          coverage xml
      - uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: ./coverage.xml

name: build

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        name: [ ubuntu ]
        include:
          - name: ubuntu
            os: ubuntu-latest
            python-version: 3.9
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install Poetry
        uses: snok/install-poetry@v1
        with:
          virtualenvs-create: true
          virtualenvs-in-project: true
      - name: Load cached venv
        id: cached-pip-wheels
        uses: actions/cache@v2
        with:
          path: ~/.cache
          key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
      - name: Upgrade pip
        run: poetry run pip install -U pip
      - name: Install setuptools
        run: poetry run pip install -U setuptools
      - name: Install dependencies
        run: poetry install --no-interaction --no-root
      - name: Install library
        run: poetry install --no-interaction
      - name: Run test suite
        run: |
          source $VENV
          coverage run --source=dribdat -m pytest tests/
      - name: Generate coverage report
        run: |
          source $VENV
          coverage xml
      - uses: codecov/codecov-action@v1
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          files: ./coverage.xml

Update install poetry for CI
Update install poetry for CI
