Skip to content

Commit

Permalink
Merge pull request #55 from hanwenxu1/main
Browse files Browse the repository at this point in the history
给pytest.yml添加了cache pip提高速度
  • Loading branch information
lindsey98 authored Jan 2, 2025
2 parents e635e89 + 759aa2d commit 19adec8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ jobs:
with:
auto-update-conda: true # 自动更新 Conda
python-version: '3.9' # 指定 Python 版
activate-environment: phishpedia

# 保存cache
- name: Cache Conda packages and pip cache
uses: actions/cache@v3
with:
path: |
~/.conda/pkgs # 缓存 Conda 包
~/.cache/pip # 缓存 pip 包
phishpedia/lib/python3.9/site-packages # 可选:缓存虚拟环境的 site-packages
key: ${{ runner.os }}-conda-${{ hashFiles('**/environment.yml', '**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-conda-
# 第三步:升级 pip
- name: Upgrade pip
Expand Down

0 comments on commit 19adec8

Please sign in to comment.