File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 permissions :
4444 packages : write
4545 contents : read
46+ actions : read
4647 steps :
4748 - name : Check out the repo
4849 uses : actions/checkout@v4
8889 tags : ${{ steps.meta.outputs.tags }}
8990 labels : ${{ steps.meta.outputs.labels }}
9091 platforms : linux/amd64,linux/arm64/v8
91- cache-from : type=gha
92- cache-to : type=gha,mode=max
92+ cache-from : |
93+ type=registry,ref=ghcr.io/${{ github.repository_owner }}/build-cache:${{ steps.image_name.outputs.IMAGE }}-buildcache
94+ cache-to : |
95+ type=registry,ref=ghcr.io/${{ github.repository_owner }}/build-cache:${{ steps.image_name.outputs.IMAGE }}-buildcache,mode=max
Original file line number Diff line number Diff line change @@ -27,18 +27,37 @@ jobs:
2727 with :
2828 python-version : ' 3.11.x'
2929
30+ - name : Cache apt packages
31+ uses : actions/cache@v4
32+ env :
33+ cache-name : cache-apt
34+ with :
35+ path : /var/lib/apt/lists
36+ key : ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('.github/workflows/packages.txt') }}
37+ restore-keys : |
38+ ${{ runner.os }}-${{ env.cache-name }}-
39+
3040 - name : Cache pip packages
3141 uses : actions/cache@v4
42+ env :
43+ cache-name : cache-pip
3244 with :
3345 path : ~/.cache/pip
34- key : ${{ runner.os }}-pip -${{ hashFiles('**/requirements.txt') }}
46+ key : ${{ runner.os }}-${{ env.cache-name }} -${{ hashFiles('**/requirements.txt') }}
3547 restore-keys : |
36- ${{ runner.os }}-pip-
48+ ${{ runner.os }}-${{ env.cache-name }}-
49+
50+ - name : Install system dependencies
51+ run : |
52+ if [ -s .github/workflows/packages.txt ]; then
53+ sudo apt-get update
54+ sudo xargs -a .github/workflows/packages.txt apt-get install -y
55+ fi
3756
38- - name : Install dependencies
57+ - name : Install Python dependencies
3958 run : |
4059 python -m pip install --upgrade pip pytest
4160 pip install -r requirements.txt
4261
4362 - name : Run pytest
44- run : pytest tests/test_main.py
63+ run : pytest -s
You can’t perform that action at this time.
0 commit comments