Skip to content

Commit

Permalink
Add poetry scripts to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Collins committed Apr 7, 2020
1 parent e3b27f2 commit 8558dee
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,30 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install Poetry
uses: dschep/install-poetry-action@v1.3

- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Set Poetry config
run: |
poetry config settings.virtualenvs.in-project false
poetry config settings.virtualenvs.path ~/.virtualenvs
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'

- name: Code Quality
run: poetry run black . --check

- name: Test with pytest
run: poetry run pytest --cov-report term-missing --cov=labthings ./tests

0 comments on commit 8558dee

Please sign in to comment.