Cache persist #137
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cache persist | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 */3 * *' | |
jobs: | |
access-fastf1-master-cache: | |
# Simply access the FastF1 cache for all runners of the test matrix without | |
# modifying them to prevent GitHub from deleting the cache entries because | |
# they have not been accessed. | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.9-minver', '3.9', '3.10', '3.11', '3.12'] | |
# | |
name: Persist cache for ${{ matrix.python-version }} | |
steps: | |
- name: Create cache directory | |
run: | | |
mkdir test_cache # make sure cache dir exists | |
- name: Cache FastF1 | |
uses: actions/cache@v4 | |
with: | |
path: ./test_cache | |
key: fastf1-${{ matrix.python-version }}-${{ hashFiles('*.*') }} | |
restore-keys: | | |
fastf1-${{ matrix.python-version }} |