-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(action): Use cache #1891
feat(action): Use cache #1891
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a pip cache to avoid re-downloading packages when running an action! Looks good!
I think it is worth considering using this action to actually store the installed dependencies as well |
This modified workflow caches the installed dependencies based on the hash of the requirements file. name: CG Installation tests
on: ["pull_request"]
jobs:
installations:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
# Check out cg code
- name: Check out git repository
uses: actions/checkout@v3
# Set up python
- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
# Cache the installed dependencies
- name: Cache pip packages
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install pip
# Make sure that we have correct python version and pip version
# For details see .github/workflows/server_info.md
run: |
python -m pip install --upgrade pip
echo $PYTHON_VERSION
pip --version
env:
PYTHON_VERSION: ${{ matrix.python-version}}
|
Kudos, SonarCloud Quality Gate passed! |
Nothing to deploy |
Description
Added
Changed
Fixed
How to prepare for test
us
paxa
How to test
Expected test outcome
Review
Thanks for filling in who performed the code review and the test!
This version is a
Implementation Plan