From 4ce59859f80ae5c9959369785a681ab3a9be05a6 Mon Sep 17 00:00:00 2001 From: Johannes Buchner Date: Fri, 20 Oct 2023 17:33:10 +0200 Subject: [PATCH] [ci] add caching for conda downloads --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e9da65d..4c62ade 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,6 +28,15 @@ jobs: - name: Install system dependencies run: sudo apt-get update && sudo apt-get -y --no-install-recommends install -y ghostscript + - name: Cache conda package downloads + uses: actions/cache@v3 + env: + # Increase this value to reset cache if environment-test.yml has not changed + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-Sherpa-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }} + - uses: conda-incubator/setup-miniconda@v2 with: miniforge-variant: Mambaforge @@ -187,6 +196,15 @@ jobs: - name: Install system dependencies run: sudo apt-get update && sudo apt-get -y --no-install-recommends install -y ghostscript + - name: Cache conda package downloads + uses: actions/cache@v3 + env: + # Increase this value to reset cache if environment-test.yml has not changed + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-Xspec-py${{matrix.python-version}}-conda-${{ env.CACHE_NUMBER }} + - uses: conda-incubator/setup-miniconda@v2 with: miniforge-variant: Mambaforge