Skip to content

Commit 05da514

Browse files
committed
Fixing cache for pdm
1 parent 3519d98 commit 05da514

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/build-python-client.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
# experimental: true
3232
- python-version: "3.10"
3333
os: windows-2019
34-
experimental: true
34+
experimental: false
3535
continue-on-error: ${{ matrix.experimental }} # https://ncorti.com/blog/howto-github-actions-build-matrix
3636
steps:
3737

@@ -43,14 +43,18 @@ jobs:
4343
- name: Checkout code
4444
uses: actions/checkout@v3.3.0
4545

46+
- name: Cache Python deps
47+
uses: actions/cache@v3
48+
with:
49+
path: python-client/.venv
50+
key: ${{ runner.os }}-${{ matrix.python-version }}-python-deps-${{ hashFiles('python-client/tests/fixtures/**/*py')}}
51+
restore-keys: ${{ runner.os }}-${{ matrix.python-version }}-python-deps
52+
4653
- name: Setup PDM
4754
uses: pdm-project/setup-pdm@v3
4855
with:
49-
working-directory: python-client
50-
5156
python-version: ${{ matrix.python-version }}
52-
cache: true
53-
cache-dependency-path: 'python-client/pdm.lock'
57+
cache: false
5458

5559
- name: Set up Pandoc (needed for python-client doc)
5660
uses: r-lib/actions/setup-pandoc@v2
@@ -61,8 +65,8 @@ jobs:
6165
uses: actions/cache@v3
6266
with:
6367
path: ~/.giskard
64-
key: ${{ runner.os }}-giskard-test-resources-${{ hashFiles('python-client/tests/fixtures/**/*py')}}
65-
restore-keys: ${{ runner.os }}-giskard-test-resources
68+
key: ${{ runner.os }}-${{ matrix.python-version }}-python-test-resources-${{ hashFiles('python-client/tests/fixtures/**/*py')}}
69+
restore-keys: ${{ runner.os }}-${{ matrix.python-version }}-python-giskard-test-resources
6670

6771
- name: Install dependencies
6872
working-directory: python-client
@@ -75,7 +79,7 @@ jobs:
7579
- name: Test code
7680
working-directory: python-client
7781
env:
78-
PYTEST_XDIST_AUTO_NUM_WORKERS: 1
82+
PYTEST_XDIST_AUTO_NUM_WORKERS: ${{ runner.os == 'windows-2019' && 1 || 2 }}
7983
run: pdm run test-fast
8084

8185
- name: Build doc

0 commit comments

Comments
 (0)