From b16cd32937c9b00c0b510870750818d555a7ff30 Mon Sep 17 00:00:00 2001 From: alsmith Date: Tue, 25 Jun 2024 11:51:22 +0100 Subject: [PATCH] feat: Update CI workflow to use Ubuntu latest for matrix testing --- .github/workflows/CI.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 191aca4f..651665e5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -74,14 +74,6 @@ jobs: shell: bash -el {0} run: | pip install .[full] - pip install pytest-cov pytest-order pytest-xdist git+https://github.com/alsmith151/CoolBox.git - - - name: Cache the complete environment - uses: actions/cache@v3 - with: - path: ${{ env.CONDA }}/envs - key: ${{env.CACHE_ID_UNIQ}} - id: cache-conda-env-capcruncher test: runs-on: ${{ matrix.os }} @@ -101,13 +93,24 @@ jobs: key: ${{ env.CACHE_NUMBER }} id: bowtie2_cache - - name: Restore capcruncher env + - name: Cache Conda env uses: actions/cache@v3 with: path: ${{ env.CONDA }}/envs - key: ${{env.CACHE_ID_UNIQ}} - id: cache-conda-env-capcruncher - + key: conda-${{ runner.os }}--${{ runner.arch }}--${{ + steps.get-date.outputs.today }}-${{ + hashFiles('environment.yml') }}-${{ env.CACHE_NUMBER}} + env: + # Increase this value to reset cache if etc/example-environment.yml has not changed + CACHE_NUMBER: 0 + id: cache-conda-env + + - name: install the package + shell: bash -el {0} + run: | + pip install .[full] + pip install pytest-cov pytest-order pytest-xdist + - name: Run test for ${{ matrix.tests }} shell: bash -el {0} run: |