2020 python-version : ["3.10", "3.11", "3.12", "3.13"]
2121
2222 steps :
23- - uses : actions/checkout@v3
23+ - uses : actions/checkout@v4
2424 - name : Set up Python ${{ matrix.python-version }}
25- uses : actions/setup-python@v3
25+ uses : actions/setup-python@v4
2626 with :
2727 python-version : ${{ matrix.python-version }}
2828 - name : Install dependencies
3333 python -m pip install ruff==0.13.3 pytest pytest-cov pytest-runner
3434 pip install -r requirements/requirements.txt
3535 - name : Cache tiatoolbox static assets
36- uses : actions/cache@v3
36+ uses : actions/cache@v4
3737 with :
3838 key : tiatoolbox-home-static
3939 path : ~/.tiatoolbox
7676 coverage-file : coverage.xml
7777 dsn : ${{ secrets.DEEPSOURCE_DSN }}
7878 fail-ci-on-error : false
79+ - name : List tiatoolbox contents
80+ run : ls -lahR ~/.tiatoolbox
81+ - name : Delete Hugging Face cache for large models
82+ run : |
83+ find ~/.tiatoolbox/models -type f -size +250M -exec bash -c '
84+ for model_path; do
85+ model_name=$(basename "$model_path")
86+ cache_dir="$HOME/.tiatoolbox/models/.cache/huggingface/download"
87+ rm -vf "$cache_dir/${model_name}.lock" "$cache_dir/${model_name}.metadata"
88+ done
89+ ' bash {} +
7990
8091 release :
8192 runs-on : ubuntu-24.04
@@ -84,10 +95,10 @@ jobs:
8495 if : github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pre-release' || startsWith(github.ref, 'refs/tags/v')
8596
8697 steps :
87- - uses : actions/checkout@v3
98+ - uses : actions/checkout@v4
8899
89100 - name : Set up Python 3.10
90- uses : actions/setup-python@v3
101+ uses : actions/setup-python@v4
91102 with :
92103 python-version : ' 3.10'
93104 cache : ' pip'
0 commit comments