Skip to content

Commit 0e40d47

Browse files
committed
👷 Add caching to CI workflow
1 parent e7e60a5 commit 0e40d47

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

.github/workflows/test-builds.yml

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

110110
steps:
111111

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

0 commit comments

Comments
 (0)