Optimize workflow.
This commit is contained in:
parent
ae98334edd
commit
2746c9d96f
1 changed files with 7 additions and 4 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
@ -20,11 +20,11 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-ruby@v1
|
- uses: actions/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 2.6
|
ruby-version: '2.6.x'
|
||||||
|
|
||||||
- uses: actions/setup-python@v1
|
- uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.7.6
|
python-version: '3.7.x'
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -38,12 +38,15 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gems-
|
${{ runner.os }}-gems-
|
||||||
|
|
||||||
|
- id: get-pip-cache-path
|
||||||
|
run: |
|
||||||
|
echo "::set-output name=path::`pip show pip | grep "Location" | awk '{print $2}'`"
|
||||||
|
|
||||||
- name: Pip caching
|
- name: Pip caching
|
||||||
id: pip-cache
|
id: pip-cache
|
||||||
uses: actions/cache@v1
|
uses: actions/cache@v1
|
||||||
with:
|
with:
|
||||||
# the path from: pip show pip | grep Location
|
path: ${{ steps.get-pip-cache-path.outputs.path }}
|
||||||
path: ${{ runner.tool_cache }}/Python/3.7.6/x64/lib/python3.7/site-packages
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
|
|
Loading…
Reference in a new issue