Skip to content

Commit

Permalink
Added poetry virtualenv caching + wrapped tox and coverage with poetr…
Browse files Browse the repository at this point in the history
…y to ensure they run in the poetry venv.
  • Loading branch information
madpah committed Sep 2, 2021
1 parent 3953675 commit 780e3df
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,20 @@ jobs:
uses: Gr1N/setup-poetry@v7
with:
poetry-version: 1.1.8
- uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install dependencies
run: poetry install
- name: Ensure build successful
run: poetry build
- name: Run tox
run: tox
run: poetry run tox
- name: Generate coverage reports
run: >
coverage report && coverage xml -o ${{ env.REPORTS_DIR }}/coverage.xml &&
coverage html -d ${{ env.REPORTS_DIR }}
poetry run coverage report && coverage xml -o ${{ env.REPORTS_DIR }}/coverage.xml &&
poetry run coverage html -d ${{ env.REPORTS_DIR }}
- name: Artifact reports
if: ${{ ! cancelled() }}
# see https://github.com/actions/upload-artifact
Expand Down

0 comments on commit 780e3df

Please sign in to comment.