]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
👷 Fix and tweak CI cache handling (#5696)
authorSebastián Ramírez <tiangolo@gmail.com>
Sun, 27 Nov 2022 13:11:22 +0000 (14:11 +0100)
committerGitHub <noreply@github.com>
Sun, 27 Nov 2022 13:11:22 +0000 (13:11 +0000)
.github/workflows/publish.yml
.github/workflows/smokeshow.yml
.github/workflows/test.yml

index fe4c5ee86c8c55775146b1d259e90541b9c2ecba..ab27d4b855d0d53c38a1b29009d523103fa56b58 100644 (file)
@@ -18,6 +18,8 @@ jobs:
         uses: actions/setup-python@v4
         with:
           python-version: "3.7"
+          cache: "pip"
+          cache-dependency-path: pyproject.toml
       - uses: actions/cache@v3
         id: cache
         with:
index 7559c24c06228b22ae8eaef0acf662c3b30f131f..55d64517f5a0808c6524341a7c6579a8bbabd48f 100644 (file)
@@ -17,6 +17,8 @@ jobs:
       - uses: actions/setup-python@v4
         with:
           python-version: '3.9'
+          cache: "pip"
+          cache-dependency-path: pyproject.toml
 
       - run: pip install smokeshow
 
index 85779af18b817ee763fda29a743dcf2af23c9633..ddc43c942b5581e006ee6e41ee8da392d761a876 100644 (file)
@@ -19,13 +19,17 @@ jobs:
       - uses: actions/checkout@v3
       - name: Set up Python
         uses: actions/setup-python@v4
-        id: setup-python
         with:
           python-version: ${{ matrix.python-version }}
           cache: "pip"
           cache-dependency-path: pyproject.toml
+      - uses: actions/cache@v3
+        id: cache
+        with:
+          path: ${{ env.pythonLocation }}
+          key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test-v03
       - name: Install Dependencies
-        if: steps.setup-python.outputs.cache-hit != 'true'
+        if: steps.cache.outputs.cache-hit != 'true'
         run: pip install -e .[all,dev,doc,test]
       - name: Lint
         run: bash scripts/lint.sh
@@ -50,6 +54,8 @@ jobs:
       - uses: actions/setup-python@v4
         with:
           python-version: '3.8'
+          cache: "pip"
+          cache-dependency-path: pyproject.toml
 
       - name: Get coverage files
         uses: actions/download-artifact@v3