Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

ci(lfs): attempt at cache lfs to reduce bandwidth #115

Merged
merged 3 commits into from
Jul 20, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- master
pull_request:
paths:
- ".github/**"
- "setup.cfg"
- "src/**"
- "tests/**"
Expand All @@ -23,8 +24,21 @@ jobs:
COVERAGE_FILE: ${{ github.workspace }}/.coverage.${{ matrix.python-version }}-${{ matrix.tests }}
steps:
- uses: actions/checkout@v2
- name: Create LFS file list
run: |
git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v2
id: lfs-cache
with:
lfs: true
path: .git/lfs
# The cache of lfs should be the same on all jobs. Not sure
# what happens when an update has occured and every job tries
# to upload a new version.
# key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
key: lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand Down