File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -20,30 +20,25 @@ jobs:
20
20
- name : Install Poetry
21
21
uses : snok/install-poetry@v1
22
22
with :
23
+ virtualenvs-create : true
23
24
virtualenvs-in-project : true
24
25
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
29
26
- name : Load cached venv
30
27
id : cached-poetry-dependencies
31
28
uses : actions/cache@v3
32
29
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 ') }}
35
32
36
- - name : Install dependencies
37
- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
33
+ - name : Poetry install
38
34
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'
42
37
43
38
- name : Run test suite
44
39
run : |
45
- ~/.local /bin/pytest tests
40
+ .venv /bin/pytest tests
46
41
47
42
- name : Run mypy
48
43
run : |
49
- ~/.local /bin/mypy
44
+ .venv /bin/mypy
You can’t perform that action at this time.
0 commit comments