From 86bfcf208df33183c7d4f29a7456f7c3cbf2b4d3 Mon Sep 17 00:00:00 2001 From: Stefanie Molin <24376333+stefmolin@users.noreply.github.com> Date: Sat, 12 Oct 2024 12:12:28 -0400 Subject: [PATCH] Add conda cache for actions (#36) --- .github/workflows/env-checks.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/env-checks.yml b/.github/workflows/env-checks.yml index 77e01a5..9be5c19 100644 --- a/.github/workflows/env-checks.yml +++ b/.github/workflows/env-checks.yml @@ -57,6 +57,16 @@ jobs: else sed -i -e '/- python[>=]/d' environment.yml; fi; + + - name: Cache conda + uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4.1.1 + env: + # Increase this value to reset cache if environment.yml has not changed + CACHE_NUMBER: 0 + with: + path: ~/conda_pkgs_dir + key: + ${{ runner.os }}-${{ matrix.python-version }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }} # create the conda env - uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3.0.4