From 2746c9d96f2452950082f7897ce8d2ca7fa77898 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sun, 26 Jan 2020 00:45:06 +0800 Subject: [PATCH] Optimize workflow. --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22b9fe2..30d0223 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,11 @@ jobs: steps: - uses: actions/setup-ruby@v1 with: - ruby-version: 2.6 + ruby-version: '2.6.x' - uses: actions/setup-python@v1 with: - python-version: 3.7.6 + python-version: '3.7.x' - name: Checkout uses: actions/checkout@v2 @@ -38,12 +38,15 @@ jobs: restore-keys: | ${{ 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 id: pip-cache uses: actions/cache@v1 with: - # the path from: pip show pip | grep Location - path: ${{ runner.tool_cache }}/Python/3.7.6/x64/lib/python3.7/site-packages + path: ${{ steps.get-pip-cache-path.outputs.path }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} restore-keys: | ${{ runner.os }}-pip-