From 203a4d9d0f277cafa1bdfec06b63c7598169b08f Mon Sep 17 00:00:00 2001 From: J-E Castagnede Date: Tue, 12 Mar 2024 17:27:56 +0100 Subject: [PATCH] fix CI cache --- .github/workflows/dependencies.yml | 21 +++------------------ .github/workflows/test.yml | 6 +++--- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 2ec5e7d63c..d9fbf40e43 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -25,28 +25,13 @@ jobs: - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v5 + - uses: ./.github/actions/python-cache-requirements with: - python-version: ${{ matrix.python-version }} - - - uses: actions/cache@v3 - with: - path: | - ~/.cache/pip - ~/.wheel_dir - - key: pip-cache-${{ matrix.python-version }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }} - restore-keys: | - pip-cache-${{ matrix.python-version }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }} - pip-cache-${{ matrix.python-version }}- + requirements: dev-requirements.txt - name: Install dependencies run: | - pip3 wheel --wheel-dir=~/.wheel_dir pip wheel setuptools - pip3 wheel --wheel-dir=~/.wheel_dir -r requirements.txt - pip3 wheel --wheel-dir=~/.wheel_dir -r dev-requirements.txt - pip3 wheel --wheel-dir=~/.wheel_dir -r docs/requirements.txt - pip3 install --find-links=~/.wheel_dir --upgrade pip-tools -c dev-requirements.txt + pip3 install -c dev-requirements.txt pip-tools - name: Check dependency graph run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c6c881864e..2daafa06e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,10 +76,10 @@ jobs: path: | ./venv - key: pip-${{ matrix.python-version }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }} + key: pip-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }} restore-keys: | - pip-${{ matrix.python-version }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }} - pip-${{ matrix.python-version }}- + pip-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }} + pip-${{ matrix.python-version }}-${{ matrix.os }} - name: Prepare test env run: |