Skip to content

Commit

Permalink
try to use actions cache
Browse files Browse the repository at this point in the history
  • Loading branch information
juanep97 committed Nov 30, 2023
1 parent c45e8aa commit a84294f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ jobs:
- name: Install httpdirfs to access astrometry index files without downloading them
run: sudo apt install httpdirfs

- uses: actions/cache/restore@v3
id: cache
with:
path: $HOME/.astrometry_cache/5200/
key: astrometry_5200_cache

- name: Debug cache
run: ls $HOME/.astrometry_cache/5200/index-5200-00.fits || true

- name: Mount astrometry index file in default location
run: mkdir -p $HOME/.astrometry_cache/5200 && httpdirfs --cache 'https://portal.nersc.gov/project/cosmo/temp/dstn/index-5200/LITE/' $HOME/.astrometry_cache/5200/

Expand All @@ -86,6 +95,13 @@ jobs:
- name: Run tests (with -o log_cli=true -o log_cli_level=DEBUG to debug CI actions)
run: pytest -o log_cli=true -o log_cli_level=DEBUG -vxs tests/

- uses: actions/cache/save@v3
with:
path: |
path/to/dependencies
some/other/dependencies
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

- name: Output some info for debugging
# | true so erros in this step are ignored
run: |
Expand Down

0 comments on commit a84294f

Please sign in to comment.