Skip to content

Commit 0b0bfc1

Browse files
authored
cache Python dependencies and PaddleOCR files (#13682)
1 parent 8f7d73e commit 0b0bfc1

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/codestyle.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,29 @@ on:
88
jobs:
99
check-code-style:
1010
runs-on: ubuntu-latest
11+
1112
steps:
1213
- uses: actions/checkout@v4
1314
with:
1415
ref: ${{ github.ref }}
16+
1517
- uses: actions/setup-python@v5
1618
with:
1719
python-version: '3.10'
18-
# Install Dependencies for Python
20+
21+
- name: Cache Python dependencies
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.cache/pip
25+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
26+
restore-keys: |
27+
${{ runner.os }}-pip-
28+
1929
- name: Install Dependencies for Python
2030
run: |
2131
python -m pip install --upgrade pip
2232
pip install "clang-format==13.0.0"
33+
2334
- uses: pre-commit/action@v3.0.1
35+
with:
36+
extra_args: '--all-files'

.github/workflows/tests.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,23 @@ jobs:
2929
uses: actions/setup-python@v5
3030
with:
3131
python-version: "3.10"
32+
33+
- name: Cache Python dependencies
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.cache/pip
37+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
38+
restore-keys: |
39+
${{ runner.os }}-pip-
40+
41+
- name: Cache PaddleOCR files
42+
uses: actions/cache@v4
43+
with:
44+
path: ~/.paddleocr/
45+
key: ${{ runner.os }}-paddleocr-${{ hashFiles('**/paddleocr.py') }}
46+
restore-keys: |
47+
${{ runner.os }}-paddleocr-
48+
3249
- name: Install dependencies
3350
run: |
3451
python -m pip install --upgrade pip

0 commit comments

Comments
 (0)