Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9acef0b

Browse filesBrowse files
committed
ci(tests): Use poetry cache action
1 parent 623a393 commit 9acef0b
Copy full SHA for 9acef0b

File tree

Expand file treeCollapse file tree

1 file changed

+2
-31
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-31
lines changed

‎.github/workflows/tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/tests.yml
+2-31Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,12 @@ jobs:
99
matrix:
1010
python-version: [ '3.10' ]
1111
steps:
12-
- uses: actions/checkout@v1
12+
- uses: actions/checkout@v3
1313
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v1
14+
uses: actions/setup-python@v3
1515
with:
1616
python-version: ${{ matrix.python-version }}
1717

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-
2318
- name: Install poetry
2419
run: |
2520
curl -O -sSL https://install.python-poetry.org/install-poetry.py
@@ -30,30 +25,6 @@ jobs:
3025
- name: Add ~/.local/bin to PATH
3126
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
3227

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-
5728
- name: Install dependencies
5829
run: poetry install -E "docs test coverage lint format"
5930

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.