Skip to content

Commit dd04cf4

Browse files
committed
actions/setup-python use auto pip caching
1 parent 0fd7db5 commit dd04cf4

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ jobs:
2121
- 27017:27017
2222

2323
steps:
24-
- name: Checkout repo
24+
- name: Check out repo
2525
uses: actions/checkout@v2
2626

27-
- name: Setup Python
27+
- name: Set up python
2828
uses: actions/setup-python@v2
2929
with:
3030
python-version: 3.8
31+
cache: pip
32+
cache-dependency-path: |
33+
setup.py
34+
requirements-ci.txt
3135
3236
- name: Install OpenBabel
3337
run: |
@@ -36,14 +40,6 @@ jobs:
3640
# https://github.com/openbabel/openbabel/issues/2408#issuecomment-1014466193
3741
sudo ln -s /usr/include/openbabel3 /usr/local/include/openbabel3
3842
39-
- name: Cache pip
40-
uses: actions/cache@v2
41-
with:
42-
path: ~/.cache/pip
43-
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-ci.txt', 'setup.py') }}
44-
restore-keys: |
45-
${{ runner.os }}-pip-
46-
4743
- name: Install dependencies
4844
run: |
4945
pip install -r requirements-ci.txt
@@ -77,7 +73,7 @@ jobs:
7773
runs-on: ubuntu-latest
7874
needs: test
7975
steps:
80-
- name: Checkout repo
76+
- name: Check out repo
8177
uses: actions/checkout@v2
8278

8379
- name: Get durations from cache

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pip-log.txt
3131
# Unit test / coverage reports
3232
.coverage
3333
.tox
34-
nosetests.xml
34+
.test_durations
3535
*.mypy_cache/*
3636

3737
# Translations

0 commit comments

Comments
 (0)