Skip to content

Commit 595b606

Browse files
committed
refactor workflows: replace setup-python with action-setup-venv for Python setup and dependency caching
1 parent 6536db7 commit 595b606

4 files changed

Lines changed: 25 additions & 40 deletions

File tree

.github/workflows/stage-build.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v5
1515

16-
- name: Set up Python
17-
uses: actions/setup-python@v5
16+
- name: Set up Python with caching
17+
uses: getsentry/action-setup-venv@v2.1.1
18+
id: venv
1819
with:
1920
python-version: '3.11'
20-
21-
- name: Install dependencies
22-
run: |
23-
pip install --upgrade pip
24-
pip install -r requirements.txt
25-
pip install -e .
21+
cache-dependency-path: requirements.txt
22+
install-cmd: pip install -r requirements.txt && pip install -e .
2623

2724
- name: Build package
2825
run: python -m build

.github/workflows/stage-device-tests.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,13 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v5
1919

20-
- name: Set up Python
21-
uses: actions/setup-python@v5
20+
- name: Set up Python with caching
21+
uses: getsentry/action-setup-venv@v2.1.1
22+
id: venv
2223
with:
2324
python-version: '3.11'
24-
25-
- name: Install dependencies
26-
run: |
27-
pip install --upgrade pip
28-
pip install -r requirements.txt
29-
pip install -e .
25+
cache-dependency-path: requirements.txt
26+
install-cmd: pip install -r requirements.txt && pip install -e .
3027

3128
- name: Test SSH with Paramiko test server
3229
shell: bash
@@ -60,16 +57,13 @@ jobs:
6057
steps:
6158
- uses: actions/checkout@v5
6259

63-
- name: Set up Python
64-
uses: actions/setup-python@v5
60+
- name: Set up Python with caching
61+
uses: getsentry/action-setup-venv@v2.1.1
62+
id: venv
6563
with:
6664
python-version: '3.11'
67-
68-
- name: Install dependencies
69-
run: |
70-
pip install --upgrade pip
71-
pip install -r requirements.txt
72-
pip install -e .
65+
cache-dependency-path: requirements.txt
66+
install-cmd: pip install -r requirements.txt && pip install -e .
7367

7468
- name: Check ADB devices
7569
run: adb devices

.github/workflows/stage-lint-test.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,13 @@ jobs:
1515
with:
1616
fetch-depth: 0 # Fetch all history for all branches
1717

18-
- name: Set up Python
19-
uses: actions/setup-python@v5
18+
- name: Set up Python with caching
19+
uses: getsentry/action-setup-venv@v2.1.1
20+
id: venv
2021
with:
2122
python-version: '3.11'
22-
23-
- name: Install dependencies
24-
run: |
25-
pip install --upgrade pip
26-
pip install -r requirements.txt
27-
pip install -e .
23+
cache-dependency-path: requirements.txt
24+
install-cmd: pip install -r requirements.txt && pip install -e .
2825

2926
- name: Run Black
3027
run: black --check ovmobilebench tests

.github/workflows/stage-validation.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v5
1515

16-
- name: Set up Python
17-
uses: actions/setup-python@v5
16+
- name: Set up Python with caching
17+
uses: getsentry/action-setup-venv@v2.1.1
18+
id: venv
1819
with:
1920
python-version: '3.11'
20-
21-
- name: Install dependencies
22-
run: |
23-
pip install --upgrade pip
24-
pip install -r requirements.txt
25-
pip install -e .
21+
cache-dependency-path: requirements.txt
22+
install-cmd: pip install -r requirements.txt && pip install -e .
2623

2724
- name: Validate example config
2825
run: |

0 commit comments

Comments
 (0)