We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0be9af commit 871cbddCopy full SHA for 871cbdd
.github/workflows/pytests.yml
@@ -17,10 +17,24 @@ jobs:
17
with:
18
fetch-depth: 2
19
20
+ - name: Activate caching based on lockfile
21
+ id: lockfile
22
+ run: |
23
+ if [ -f poetry.lock ]; then
24
+ echo "cache_type=poetry" >> $GITHUB_OUTPUT
25
+ elif [ -f requirements.txt ]; then
26
+ echo "cache_type=pip" >> $GITHUB_OUTPUT
27
+ else
28
+ # no lockfile present: create empty requirements.txt and use pip caching
29
+ touch requirements.txt
30
31
+ fi
32
+
33
- name: Set up Python
34
uses: actions/setup-python@v5
35
36
python-version: '3.13'
37
+ cache: ${{ steps.lockfile.outputs.cache_type }}
38
39
- name: Install Poetry
40
uses: snok/install-poetry@v1
0 commit comments