@@ -34,53 +34,23 @@ jobs:
3434 if : steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
3535 run : echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
3636
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-
4737 - 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"
5339
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
6942 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'
8045
8146 - name : Install dependencies [w/ docs]
8247 run : poetry install --extras "docs lint"
8348
49+ - name : Print python versions
50+ run : |
51+ python -V
52+ poetry run python -V
53+
8454 - name : Build documentation
8555 run : |
8656 pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
0 commit comments