add test cache

This commit is contained in:
Jonathan Wren 2020-11-07 13:04:35 -08:00
parent 580d55fb68
commit 714e9c6660
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A

View file

@ -19,6 +19,16 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Python version
id: get-python-version
run: |
echo "::set-output \"name=python::$(python --version)\""
shell: bash
- uses: actions/cache@v2
with:
path: |
.venv
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ steps.get-python-version.outputs.python }}
- name: Set up Python 3.8 - name: Set up Python 3.8
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
@ -26,7 +36,8 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
pip install poetry pip install poetry
poetry install poetry config --local virtualenvs.in-project true
poetry install --remove-untracked
- name: Test with pytest - name: Test with pytest
run: | run: |
poetry run pytest poetry run pytest