Skip to content

Commit

Permalink
Cache LFS objects (actions/checkout#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Feb 20, 2023
1 parent 5e107ea commit 9c21e4f
Showing 1 changed file with 29 additions and 3 deletions.
32 changes: 29 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,34 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Download reference data
run: bash .ci-helpers/download_reference_data.sh
# - name: Download reference data
# run: bash .ci-helpers/download_reference_data.sh

- name: Clone tardis-sn/tardis-refdata
uses: actions/checkout@v2
with:
repository: tardis-sn/tardis-refdata
path: tardis-refdata

- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
working-directory: tardis-refdata

- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
path: tardis-refdata/.git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('tardis-refdata/.lfs-assets-id') }}-v1

- name: Git LFS Pull
run: git lfs pull
working-directory: tardis-refdata

- name: see file size
run: ls -lrtsh -a
working-directory: tardis-refdata


- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
Expand All @@ -72,7 +98,7 @@ jobs:
run: pip install -e .

- name: Run tests
run: pytest tardis ${{ env.PYTEST_FLAGS }}
run: pytest tardis -x ${{ env.PYTEST_FLAGS }}

- name: Upload to Codecov
run: bash <(curl -s https://codecov.io/bash)

0 comments on commit 9c21e4f

Please sign in to comment.