From 94a16d6dddbd69be32fc3361da905e0e6a885d59 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Fri, 20 Sep 2024 21:29:46 +0200 Subject: [PATCH] ci: cache pip only when no container is used --- .github/workflows/integration-test.yaml | 3 +++ .github/workflows/unit-test.yaml | 15 --------------- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 6e63a6f0..226a1a08 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -126,6 +126,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.10" + cache: pip + cache-dependency-path: | + integration-tests/requirements.txt # FIXME: The test_bootstrap.py script has duplicated logic to run build # and start images and run things in them. This makes tests slower, diff --git a/.github/workflows/unit-test.yaml b/.github/workflows/unit-test.yaml index b53e53c0..812e7d6f 100644 --- a/.github/workflows/unit-test.yaml +++ b/.github/workflows/unit-test.yaml @@ -69,21 +69,6 @@ jobs: python3 -m venv /srv/venv echo '/srv/venv/bin' >> $GITHUB_PATH - # WARNING: This action loads a cache of pip dependencies based on the - # declared key, and it will save a cache for that key on job - # completion. Make sure to update the key to bust the cache - # properly if you make a change that should influence it. - - name: Load cached Python dependencies - uses: actions/cache@v4 - with: - path: /srv/venv/ - key: >- - pip- - ${{ matrix.runs_on }}- - ${{ matrix.ubuntu_version }}- - ${{ matrix.python_version }}- - ${{ hashFiles('setup.py', 'dev-requirements.txt', '.github/workflows/unit-test.yaml') }} - - name: Install Python dependencies run: | pip install -r dev-requirements.txt