Skip to content

Commit 5b5e0eb

Browse files
authored
Merge pull request roboflow#457 from roboflow/cache-pip
ci: 🚧 github action - python cache added πŸš€
2 parents 35142fc + d0139f5 commit 5b5e0eb

File tree

3 files changed

+59
-3
lines changed

3 files changed

+59
-3
lines changed

β€Ž.github/requirements-dev.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
contourpy==1.1.0 ; python_version >= "3.8" and python_full_version < "3.12.0"
2+
cycler==0.11.0 ; python_version >= "3.8" and python_full_version < "3.12.0"
3+
fonttools==4.41.1 ; python_version >= "3.8" and python_full_version < "3.12.0"
4+
importlib-resources==6.0.0 ; python_version >= "3.8" and python_version < "3.10"
5+
kiwisolver==1.4.4 ; python_version >= "3.8" and python_full_version < "3.12.0"
6+
matplotlib==3.7.2 ; python_version >= "3.8" and python_full_version < "3.12.0"
7+
numpy==1.24.4 ; python_version >= "3.8" and python_version < "3.12"
8+
opencv-python-headless==4.8.0.74 ; python_version >= "3.8" and python_full_version < "3.12.0"
9+
packaging==23.1 ; python_version >= "3.8" and python_full_version < "3.12.0"
10+
pillow==10.0.1 ; python_version >= "3.8" and python_full_version < "3.12.0"
11+
pyparsing==3.0.9 ; python_version >= "3.8" and python_full_version < "3.12.0"
12+
python-dateutil==2.8.2 ; python_version >= "3.8" and python_full_version < "3.12.0"
13+
pyyaml==6.0.1 ; python_version >= "3.8" and python_full_version < "3.12.0"
14+
scipy==1.10.1 ; python_version >= "3.8" and python_version < "3.12"
15+
six==1.16.0 ; python_version >= "3.8" and python_full_version < "3.12.0"
16+
zipp==3.16.2 ; python_version >= "3.8" and python_version < "3.10"
17+
pytest==7.4.0 ; python_version >= "3.8" and python_full_version < "3.12.0"

β€Ž.github/workflows/clear-cache.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
name: Clear cache
3+
4+
on:
5+
schedule:
6+
- cron: '0 0 1 * *'
7+
workflow_dispatch:
8+
9+
permissions:
10+
actions: write
11+
12+
jobs:
13+
clear-cache:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Clear cache
17+
uses: actions/github-script@v6
18+
with:
19+
script: |
20+
console.log("About to clear")
21+
const caches = await github.rest.actions.getActionsCacheList({
22+
owner: context.repo.owner,
23+
repo: context.repo.repo,
24+
})
25+
for (const cache of caches.data.actions_caches) {
26+
console.log(cache)
27+
github.rest.actions.deleteActionsCacheById({
28+
owner: context.repo.owner,
29+
repo: context.repo.repo,
30+
cache_id: cache.id,
31+
})
32+
}
33+
console.log("Clear completed")

β€Ž.github/workflows/test.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ jobs:
1515
uses: actions/checkout@v3
1616
- name: 🐍 Set up Python ${{ matrix.python-version }}
1717
uses: actions/setup-python@v4
18+
#Β id based on python version
19+
id: python-setup
1820
with:
1921
python-version: ${{ matrix.python-version }}
20-
- name: 🦾 Install dependencies
22+
check-latest: true
23+
cache: 'pip'
24+
cache-dependency-path: '**/requirements-dev.txt'
25+
26+
- name: πŸ“¦ Install dependencies
2127
run: |
2228
python -m pip install --upgrade pip
23-
pip install -e .
24-
pip install pytest
29+
pip install -r .github/requirements-dev.txt
30+
2531
- name: πŸ§ͺ Test
2632
run: "python -m pytest ./test"

0 commit comments

Comments
Β (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy