Skip to content

Commit

Permalink
adding cach option and setting pythonpath
Browse files Browse the repository at this point in the history
  • Loading branch information
beckynevin committed Jan 31, 2024
1 parent fef8482 commit 4a048f1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ jobs:
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
Expand All @@ -27,5 +36,10 @@ jobs:
shell: bash
run: python -m poetry install

- name: Export Python path
run: echo "::set-env name=PYTHONPATH::$(pwd)"

- name: Test with pytest
run: python -m poetry run pytest --cov
env:
PYTHONPATH: ${{ env.PYTHONPATH }}

0 comments on commit 4a048f1

Please sign in to comment.