Ver código fonte

👷 Add caching to CI workflow

Scott Lahteine 2 anos atrás
pai
commit
0e40d47c72
1 arquivos alterados com 18 adições e 4 exclusões
  1. 18
    4
      .github/workflows/test-builds.yml

+ 18
- 4
.github/workflows/test-builds.yml Ver arquivo

@@ -109,8 +109,25 @@ jobs:
109 109
 
110 110
     steps:
111 111
 
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
+
112 129
     - name: Select Python 3.7
113
-      uses: actions/setup-python@v1
130
+      uses: actions/setup-python@v2
114 131
       with:
115 132
         python-version: '3.7' # Version range or exact version of a Python version to use, using semvers version range syntax.
116 133
         architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
@@ -120,9 +137,6 @@ jobs:
120 137
         pip install -U https://github.com/platformio/platformio-core/archive/develop.zip
121 138
         platformio update
122 139
 
123
-    - name: Check out the PR
124
-      uses: actions/checkout@v2
125
-
126 140
     - name: Run ${{ matrix.test-platform }} Tests
127 141
       run: |
128 142
         make tests-single-ci TEST_TARGET=${{ matrix.test-platform }}

Carregando…
Cancelar
Salvar