Skip to content

Commit c1d0cfb

Browse files
author
Frankie Robertson
committed
Fixup github action
1 parent d244c0a commit c1d0cfb

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

.github/workflows/pytest.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,25 @@ jobs:
2020
- name: Install Poetry
2121
uses: snok/install-poetry@v1
2222
with:
23+
virtualenvs-create: true
2324
virtualenvs-in-project: true
2425

25-
- name: Generate requirements.txt
26-
run: |
27-
poetry export --extras tests --extras docs --extras annoy --extras faiss --extras pynndescent --with=dev --without-hashes -o requirements.txt &&
28-
sed -i '/^torch$/d' requirements.txt
2926
- name: Load cached venv
3027
id: cached-poetry-dependencies
3128
uses: actions/cache@v3
3229
with:
33-
path: ~/.local
34-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}
30+
path: .venv
31+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
3532

36-
- name: Install dependencies
37-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
33+
- name: Poetry install
3834
run: |
39-
pip install --user -r requirements.txt &&
40-
pip install --user --extra-index-url https://download.pytorch.org/whl/nightly/cpu --pre torch &&
41-
pip install --user --no-deps -e .
35+
poetry install --extras tests --extras docs --extras annoy --extras faiss --extras pynndescent
36+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
4237

4338
- name: Run test suite
4439
run: |
45-
~/.local/bin/pytest tests
40+
.venv/bin/pytest tests
4641
4742
- name: Run mypy
4843
run: |
49-
~/.local/bin/mypy
44+
.venv/bin/mypy

0 commit comments

Comments
 (0)