]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
👷 Update `setup-python` action in tests to use new caching feature (#5680)
authorMichael Adkins <michael@prefect.io>
Fri, 25 Nov 2022 11:38:55 +0000 (05:38 -0600)
committerGitHub <noreply@github.com>
Fri, 25 Nov 2022 11:38:55 +0000 (12:38 +0100)
.github/workflows/test.yml

index 7f87be700b0e604176ab1a577525fbbf03c95e74..85779af18b817ee763fda29a743dcf2af23c9633 100644 (file)
@@ -19,15 +19,13 @@ jobs:
       - uses: actions/checkout@v3
       - name: Set up Python
         uses: actions/setup-python@v4
+        id: setup-python
         with:
           python-version: ${{ matrix.python-version }}
-      - uses: actions/cache@v3
-        id: cache
-        with:
-          path: ${{ env.pythonLocation }}
-          key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-test-v02
+          cache: "pip"
+          cache-dependency-path: pyproject.toml
       - name: Install Dependencies
-        if: steps.cache.outputs.cache-hit != 'true'
+        if: steps.setup-python.outputs.cache-hit != 'true'
         run: pip install -e .[all,dev,doc,test]
       - name: Lint
         run: bash scripts/lint.sh