Skip to content

Install dev dependencies when testings #80

Install dev dependencies when testings

Install dev dependencies when testings #80

Workflow file for this run

name: test
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Cache Poetry dependencies
uses: actions/cache@v2
with:
path: |
~/.cache
~/.local/share/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-poetry-
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install poetry ${{ matrix.poetry-version }}
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install poetry==1.3.2
- name: View poetry --help
run: poetry --help
- name: Update lockfile
run: python -m poetry lock
- name: Install dependencies
shell: bash
run: python -m poetry install --with dev
- name: Create Environment File
run: echo "PYTHONPATH=$(pwd):$(pwd)/src" >> ${{ runner.workspace }}/.env
- name: Test with pytest
run: python -m poetry run pytest --cov=src/
env:
PYTHONPATH: ${{ env.PYTHONPATH }}
ENV_FILE: ${{ runner.workspace }}/.env