Skip to content

Commit 4c6808a

Browse files
authored
Merge pull request #305 from jayzalani/master
Added: Caching in CI/CD workflow
2 parents b520dd7 + da48444 commit 4c6808a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/build-sphinx-docs.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@ jobs:
2222
uses: actions/setup-python@v5
2323
with:
2424
python-version: '3.10'
25+
cache: 'pip'
2526

27+
- name: Cache Sphinx build
28+
uses: actions/cache@v3
29+
with:
30+
path: docs/py_docs/_build
31+
key: ${{ runner.os }}-sphinx-${{ hashFiles('docs/py_docs/**') }}
32+
restore-keys: |
33+
${{ runner.os }}-sphinx-
2634
2735
- name: Install dependencies
2836
run: |

.github/workflows/ci-run-tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@ jobs:
1818
uses: actions/setup-python@v5
1919
with:
2020
python-version: '3.10'
21+
cache: 'pip'
22+
23+
- name: Cache pytest
24+
uses: actions/cache@v3
25+
with:
26+
path: |
27+
.pytest_cache
28+
__pycache__
29+
key: ${{ runner.os }}-pytest-${{ hashFiles('**/*.py') }}
30+
restore-keys: |
31+
${{ runner.os }}-pytest-
2132
2233
- name: Install dependencies
2334
run: python -m pip install pytest .

0 commit comments

Comments
 (0)