Skip to content

Commit 2746c9d

Browse files
committed
Optimize workflow.
1 parent ae98334 commit 2746c9d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ jobs:
2020
steps:
2121
- uses: actions/setup-ruby@v1
2222
with:
23-
ruby-version: 2.6
23+
ruby-version: '2.6.x'
2424

2525
- uses: actions/setup-python@v1
2626
with:
27-
python-version: 3.7.6
27+
python-version: '3.7.x'
2828

2929
- name: Checkout
3030
uses: actions/checkout@v2
@@ -38,12 +38,15 @@ jobs:
3838
restore-keys: |
3939
${{ runner.os }}-gems-
4040
41+
- id: get-pip-cache-path
42+
run: |
43+
echo "::set-output name=path::`pip show pip | grep "Location" | awk '{print $2}'`"
44+
4145
- name: Pip caching
4246
id: pip-cache
4347
uses: actions/cache@v1
4448
with:
45-
# the path from: pip show pip | grep Location
46-
path: ${{ runner.tool_cache }}/Python/3.7.6/x64/lib/python3.7/site-packages
49+
path: ${{ steps.get-pip-cache-path.outputs.path }}
4750
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
4851
restore-keys: |
4952
${{ runner.os }}-pip-

0 commit comments

Comments
 (0)