@@ -34,53 +34,23 @@ jobs:
34
34
if : steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
35
35
run : echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
36
36
37
- - name : Set up Python ${{ matrix.python-version }}
38
- uses : actions/setup-python@v3
39
- with :
40
- python-version : ${{ matrix.python-version }}
41
-
42
- - name : Get full Python version
43
- id : full-python-version
44
- shell : bash
45
- run : echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
46
-
47
37
- name : Install poetry
48
- run : |
49
- curl -O -sSL https://install.python-poetry.org/install-poetry.py
50
- python install-poetry.py -y --version 1.1.14
51
- echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
52
- rm install-poetry.py
38
+ run : pipx install "poetry==1.1.14"
53
39
54
- - name : Add ~/.local/bin to PATH
55
- run : echo "$HOME/.local/bin" >> $GITHUB_PATH
56
-
57
- - name : Get poetry cache paths from config
58
- run : |
59
- echo "poetry_virtualenvs_path=$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^\"//' -e 's/\"$//')" >> $GITHUB_ENV
60
- echo "poetry_virtualenvs_path=$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^\"//' -e 's/\"$//')" >> $GITHUB_ENV
61
-
62
- - name : Configure poetry
63
- shell : bash
64
- run : poetry config virtualenvs.in-project true
65
-
66
- - name : Set up cache
67
- uses : actions/cache@v3
68
- id : cache
40
+ - name : Set up Python ${{ matrix.python-version }}
41
+ uses : actions/setup-python@v4
69
42
with :
70
- path : |
71
- .venv
72
- {{ env.poetry_cache_dir }}
73
- {{ env.poetry_virtualenvs_path }}
74
- key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
75
-
76
- - name : Ensure cache is healthy
77
- if : steps.cache.outputs.cache-hit == 'true'
78
- shell : bash
79
- run : poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
43
+ python-version : ${{ matrix.python-version }}
44
+ cache : ' poetry'
80
45
81
46
- name : Install dependencies [w/ docs]
82
47
run : poetry install --extras "docs lint"
83
48
49
+ - name : Print python versions
50
+ run : |
51
+ python -V
52
+ poetry run python -V
53
+
84
54
- name : Build documentation
85
55
run : |
86
56
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
0 commit comments