summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2024-07-31 18:21:30 -0400
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-08-05 19:30:26 +0000
commit057c26710a1f1daf68c00a72180963191d49953d (patch)
tree867a03c006a09891a3fa523169024910802079e9
parent38c4cd4e88adf6d5d5c4bf753dafba7f24f019d0 (diff)
downloadedk2-057c26710a1f1daf68c00a72180963191d49953d.tar.gz
edk2-057c26710a1f1daf68c00a72180963191d49953d.tar.bz2
edk2-057c26710a1f1daf68c00a72180963191d49953d.zip
.github/request-reviews.yml: Cache PIP modules
- Optimizes and makes the PIP module installation process for the workflow more robust by caching the pip modules used so the only time the workflow needs to reach to PyPi is when new PIP modules are published. - Improves long term stability by locking the major versions for PIP modules in the workflow. This is to reduce overall maintenance over time to automatically pick up new versions while also not being broken in the process. - Removes edk2-pytool-extensions as it is not used. The new "requirements.txt" file is used to lock versions and support the caching step which depends on a requirements file. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
-rw-r--r--.github/scripts/requirements.txt12
-rw-r--r--.github/workflows/request-reviews.yml6
2 files changed, 16 insertions, 2 deletions
diff --git a/.github/scripts/requirements.txt b/.github/scripts/requirements.txt
new file mode 100644
index 0000000000..4b4988cc2f
--- /dev/null
+++ b/.github/scripts/requirements.txt
@@ -0,0 +1,12 @@
+## @file
+# GitHub Helpers Python PIP requirements file
+#
+# This file provides the list of python components used in GitHub scripts in this repository.
+#
+# Copyright (c) Microsoft Corporation.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+edk2-pytool-library==0.*
+requests==2.*
diff --git a/.github/workflows/request-reviews.yml b/.github/workflows/request-reviews.yml
index a9b81c37d2..f80bb591d5 100644
--- a/.github/workflows/request-reviews.yml
+++ b/.github/workflows/request-reviews.yml
@@ -45,13 +45,15 @@ jobs:
BaseTools/Scripts
Maintainers.txt
- - name: Set up Python
+ - name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
+ cache: 'pip'
+ cache-dependency-path: '.github/scripts/requirements.txt'
- name: Install PIP Modules
- run: pip install edk2-pytool-library edk2-pytool-extensions requests
+ run: pip install -r .github/scripts/requirements.txt --upgrade
- name: Add Reviewers to Pull Request
shell: python