Skip to content

Commit 5ee91c7

Browse files
committed
👷 Add caching to CI workflow
1 parent 2116e42 commit 5ee91c7

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

.github/workflows/test-builds.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,25 @@ jobs:
107107

108108
steps:
109109

110+
- name: Check out the PR
111+
uses: actions/checkout@v2
112+
113+
- name: Cache pip
114+
uses: actions/cache@v2
115+
with:
116+
path: ~/.cache/pip
117+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
118+
restore-keys: |
119+
${{ runner.os }}-pip-
120+
121+
- name: Cache PlatformIO
122+
uses: actions/cache@v2
123+
with:
124+
path: ~/.platformio
125+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
126+
110127
- name: Select Python 3.7
111-
uses: actions/setup-python@v1
128+
uses: actions/setup-python@v2
112129
with:
113130
python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
114131
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
@@ -118,9 +135,6 @@ jobs:
118135
pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
119136
platformio update
120137
121-
- name: Check out the PR
122-
uses: actions/checkout@v2
123-
124138
- name: Run ${{ matrix.test-platform }} Tests
125139
run: |
126140
make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}

0 commit comments

Comments
 (0)