|
9 | 9 | matrix:
|
10 | 10 | python-version: [ '3.10' ]
|
11 | 11 | steps:
|
12 |
| - - uses: actions/checkout@v1 |
| 12 | + - uses: actions/checkout@v3 |
13 | 13 | - name: Set up Python ${{ matrix.python-version }}
|
14 |
| - uses: actions/setup-python@v1 |
| 14 | + uses: actions/setup-python@v3 |
15 | 15 | with:
|
16 | 16 | python-version: ${{ matrix.python-version }}
|
17 | 17 |
|
18 |
| - - name: Get full Python version |
19 |
| - id: full-python-version |
20 |
| - shell: bash |
21 |
| - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") |
22 |
| - |
23 | 18 | - name: Install poetry
|
24 | 19 | run: |
|
25 | 20 | curl -O -sSL https://install.python-poetry.org/install-poetry.py
|
|
30 | 25 | - name: Add ~/.local/bin to PATH
|
31 | 26 | run: echo "$HOME/.local/bin" >> $GITHUB_PATH
|
32 | 27 |
|
33 |
| - - name: Get poetry cache paths from config |
34 |
| - run: | |
35 |
| - echo "poetry_virtualenvs_path=$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^\"//' -e 's/\"$//')" >> $GITHUB_ENV |
36 |
| - echo "poetry_virtualenvs_path=$(poetry config --list | sed -n 's/.*virtualenvs.path = .* # //p' | sed -e 's/^\"//' -e 's/\"$//')" >> $GITHUB_ENV |
37 |
| -
|
38 |
| - - name: Configure poetry |
39 |
| - shell: bash |
40 |
| - run: poetry config virtualenvs.in-project true |
41 |
| - |
42 |
| - - name: Set up cache |
43 |
| - uses: actions/cache@v2 |
44 |
| - id: cache |
45 |
| - with: |
46 |
| - path: | |
47 |
| - .venv |
48 |
| - ${{ env.poetry_cache_dir }} |
49 |
| - ${{ env.poetry_virtualenvs_path }} |
50 |
| - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} |
51 |
| - |
52 |
| - - name: Ensure cache is healthy |
53 |
| - if: steps.cache.outputs.cache-hit == 'true' |
54 |
| - shell: bash |
55 |
| - run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv |
56 |
| - |
57 | 28 | - name: Install dependencies
|
58 | 29 | run: poetry install -E "docs test coverage lint format"
|
59 | 30 |
|
|
0 commit comments