8000 Actions: Use actions/setup-python cache (#1027) · PyMySQL/PyMySQL@afbef5e · GitHub
[go: up one dir, main page]

Skip to content

Commit afbef5e

Browse files
authored
Actions: Use actions/setup-python cache (#1027)
1 parent 72f70c9 commit afbef5e

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

.github/workflows/test.yaml

+9-16
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,12 @@ jobs:
4747
uses: actions/setup-python@v2
4848
with:
4949
python-version: ${{ matrix.py }}
50-
51-
- uses: actions/cache@v2
52-
with:
53-
path: ~/.cache/pip
54-
key: ${{ runner.os }}-pip-1
55-
restore-keys: |
56-
${{ runner.os }}-pip-
50+
cache: 'pip'
51+
cache-dependency-path: 'requirements-dev.txt'
5752

5853
- name: Install dependency
5954
run: |
60-
pip install -U cryptography PyNaCl pytest pytest-cov coveralls
55+
pip install -U -r requirements-dev.txt
6156
6257
- name: Set up MySQL
6358
run: |
@@ -98,16 +93,14 @@ jobs:
9893
runs-on: ubuntu-20.04
9994
needs: test
10095
steps:
101-
- uses: actions/setup-python@v2
102-
with:
103-
python-version: 3.9
96+
- name: requirements.
97+
run: |
98+
echo coveralls > requirements.txt
10499
105-
- uses: actions/cache@v2
100+
- uses: actions/setup-python@v2
106101
with:
107-
path: ~/.cache/pip
108-
key: finish-pip-1
109-
restore-keys: |
110-
finish-pip-
102+
python-version: '3.9'
103+
cache: 'pip'
111104

112105
- name: Finished
113106
run: |

requirements-dev.txt

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
cryptography
22
PyNaCl>=1.4.0
33
pytest
4+
pytest-cov
5+
coveralls

0 commit comments

Comments
 (0)
0