6
6
test :
7
7
strategy :
8
8
matrix :
9
- python-version : [ "3.7","3.8","3.9","3.10" ]
9
+ python-version : [ "3.7","3.8","3.9","3.10", "3.11" ]
10
10
runs-on : ubuntu-latest
11
11
steps :
12
12
# ----------------------------------------------
13
13
# check-out repo and set-up python
14
14
# ----------------------------------------------
15
15
- name : Check out repository
16
- uses : actions/checkout@v2
16
+ uses : actions/checkout@v3
17
17
- name : Set up python v ${{ matrix.python-version }}
18
18
id : setup-python
19
- uses : actions/setup-python@v2
19
+ uses : actions/setup-python@v4
20
20
with :
21
21
python-version : ${{ matrix.python-version }}
22
- # ----------------------------------------------
23
- # ----- install & configure poetry -----
24
- # ----------------------------------------------
25
- - name : Install Poetry
26
- uses : snok/install-poetry@v1
27
- with :
28
- virtualenvs-create : true
29
- virtualenvs-in-project : true
30
- installer-parallel : true
22
+
23
+ - name : Install poetry
24
+ run : |
25
+ python -m pip install poetry
26
+
27
+ - name : Configure poetry
28
+ run : |
29
+ python -m poetry config virtualenvs.in-project true
31
30
32
31
# ----------------------------------------------
33
32
# load cached venv if cache exists
34
33
# ----------------------------------------------
35
34
- name : Load cached venv
36
35
id : cached-poetry-dependencies
37
- uses : actions/cache@v2
36
+ uses : actions/cache@v3
38
37
with :
39
38
path : .venv
40
39
key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
41
40
# ----------------------------------------------
42
41
# install dependencies if cache does not exist
43
42
# ----------------------------------------------
44
43
- name : Install dependencies
45
- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
46
- run : poetry install --no-interaction --no-root
44
+ run : |
45
+ python -m poetry install --no-interaction --no-root
46
+
47
47
# ----------------------------------------------
48
48
# install your root project, if required
49
49
# ----------------------------------------------
50
50
- name : Install library
51
51
run : poetry install --no-interaction
52
+
52
53
# ----------------------------------------------
53
54
# run test suite
54
55
# ----------------------------------------------
55
56
- name : Run tests
56
57
run : |
57
- source .venv/bin/activate
58
- pytest faker_biology/tests/
59
- #coverage report
58
+ python -m poetry run python -m pytest -sxv faker_biology/tests
0 commit comments