无法使用 Pipenv 缓存 Github 操作的依赖项

Cannot cache dependencies on Github Actions using Pipenv

我正在尝试缓存 Github 操作工作流程的依赖项。我用 Pipenv.

这是我的配置:

    - uses: actions/cache@v1
      with:
        path: ~/.cache/pip
        key: ${{ runner.os }}-pip-${{ hashFiles('**/Pipfile') }}
        restore-keys: |
          ${{ runner.os }}-pip-

我从 Github's own examples 那里得到了这个配置,用于使用 pip。我只将 requirements.txt 更改为 Pipfile,因为我们不使用 requirements.txt。但即使使用 requirements.txt 我仍然遇到同样的问题。

Cache Dependencies 步骤总是出现这个问题:

然后在 运行 测试之后:

工作流没有错误,它正常完成,但是,它似乎永远无法找到或更新依赖项缓存。

在缓存步骤之前需要安装 pipenv...

 - name: Install pipenv, libpq, and pandoc
      run: |
        sudo apt-get install libpq-dev -y
        pip install pipenv