Skip to content

Commit

Permalink
[ci] add caching for conda downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesBuchner committed Oct 20, 2023
1 parent da2caff commit 4ce5985
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4ce5985

Please sign in to comment.