.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>
This commit is contained in:
Michael Kubacki 2024-07-31 18:21:30 -04:00 committed by mergify[bot]
parent 38c4cd4e88
commit 057c26710a
2 changed files with 16 additions and 2 deletions

12
.github/scripts/requirements.txt vendored Normal file
View File

@ -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.*

View File

@ -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