Skip to content

Commit 00592c2

Browse files
MHHukiewitzhoh
authored andcommitted
Feature: build-wheels and code-quality action use cached dependencies; trigger code-quality on every push
To reduce used compute time on action execution
1 parent d65dd4f commit 00592c2

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/build-wheels.yml

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ jobs:
2222
if: startsWith(matrix.os, 'ubuntu-')
2323
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc
2424

25+
- name: Cache dependencies
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.cache/pip
29+
key: ${{ runner.os }}-build-wheels-${{ hashFiles('setup.cfg', 'setup.py') }}
30+
restore-keys: |
31+
${{ runner.os }}-build-wheels-
32+
2533
- name: Install required system packages for macOS
2634
if: startsWith(matrix.os, 'macos-')
2735
run: |

.github/workflows/code-quality.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ name: Test code quality
22

33
on:
44
push:
5-
branches:
6-
- main
75
pull_request:
86
branches:
97
- main
@@ -18,6 +16,14 @@ jobs:
1816
- name: Workaround github issue https://github.com/actions/runner-images/issues/7192
1917
run: sudo echo RESET grub-efi/install_devices | sudo debconf-communicate grub-pc
2018

19+
- name: Cache dependencies
20+
uses: actions/cache@v3
21+
with:
22+
path: ~/.cache/pip
23+
key: ${{ runner.os }}-code-quality-${{ hashFiles('setup.cfg', 'setup.py') }}
24+
restore-keys: |
25+
${{ runner.os }}-code-quality-
26+
2127
- name: Install required system packages only for Ubuntu Linux
2228
run: |
2329
sudo apt-get update

0 commit comments

Comments
 (0)