@@ -11,27 +11,18 @@ jobs:
11
11
runs-on : " ubuntu-latest"
12
12
steps :
13
13
- name : Checkout
14
- uses : actions/checkout@v2
14
+ uses : actions/checkout@v3
15
15
with :
16
16
fetch-depth : 0
17
17
- name : Install Poetry
18
- uses : snok/install-poetry@v1
19
- with :
20
- virtualenvs-create : true
21
- virtualenvs-in-project : true
18
+ run : pipx install poetry
22
19
- name : Setup python
23
- uses : actions/setup-python@v2
20
+ uses : actions/setup-python@v4
24
21
with :
25
22
python-version : " 3.11"
26
- - name : Load cache
27
- uses : actions/cache@v2
28
- id : cached-poetry-dependencies
29
- with :
30
- path : .venv
31
- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
23
+ cache : " poetry"
32
24
- name : Install dependencies
33
- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
34
- run : poetry install --no-interaction --no-root
25
+ run : poetry install
35
26
- name : Lint
36
27
run : make lint
37
28
@@ -44,44 +35,35 @@ jobs:
44
35
runs-on : ${{ matrix.os }}
45
36
steps :
46
37
# ----------------------------------------------
47
- # check-out repo and set-up python
38
+ # check-out repo
48
39
# ----------------------------------------------
49
40
- name : Check out repository
50
- uses : actions/checkout@v2
41
+ uses : actions/checkout@v3
51
42
with :
52
43
fetch-depth : 0
53
- - name : Set up python ${{ matrix.python-version }}
54
- id : setup-python
55
- uses : actions/setup-python@v2
56
- with :
57
- python-version : ${{ matrix.python-version }}
58
44
# ----------------------------------------------
59
- # install & configure poetry
45
+ # install poetry
60
46
# ----------------------------------------------
61
47
- name : Install Poetry
62
- uses : snok/install-poetry@v1
63
- with :
64
- virtualenvs-create : true
65
- virtualenvs-in-project : true
48
+ run : pipx install poetry
66
49
# ----------------------------------------------
67
- # load cached venv if cache exists
50
+ # set-up python
68
51
# ----------------------------------------------
69
- - name : Load cached venv
70
- id : cached-poetry-dependencies
71
- uses : actions/cache@v2
52
+ - name : Set up python ${{ matrix.python-version }}
53
+ id : setup-python
54
+ uses : actions/setup-python@v4
72
55
with :
73
- path : .venv
74
- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/ poetry.lock') }}
56
+ python-version : ${{ matrix.python-version }}
57
+ cache : " poetry"
75
58
# ----------------------------------------------
76
59
# install dependencies if cache does not exist
77
60
# ----------------------------------------------
78
61
- name : Install dependencies
79
62
if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
80
- run : poetry install --no-interaction --no-root
63
+ run : poetry install
81
64
# ----------------------------------------------
82
65
# run test suite
83
66
# ----------------------------------------------
84
67
- name : Run tests
85
68
run : |
86
- source .venv/bin/activate
87
69
poetry run pytest --cov=./jquants-api-client-python --cov-report=xml tests/
0 commit comments