From 79ba85a22ef138ae4b51cb0189c205c8b2b44d01 Mon Sep 17 00:00:00 2001 From: merwanehamadi Date: Sat, 3 Jun 2023 07:48:32 -0700 Subject: [PATCH] Cache Python Packages in the CI pipeline (#4488) --- .github/workflows/ci.yml | 18 ++++++++++++++++++ .../integration/challenges/current_score.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5219b9826bd..8651931c0d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,15 @@ jobs: with: python-version: ${{ env.min-python-version }} + - name: Set Date + run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + - name: Cache Python packages + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ env.DATE }} + - name: Install dependencies run: | python -m pip install --upgrade pip @@ -112,6 +121,15 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Set Date + run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + + - name: Cache Python packages + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-${{ env.DATE }} + - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/tests/integration/challenges/current_score.json b/tests/integration/challenges/current_score.json index 726613991d4..8412e908119 100644 --- a/tests/integration/challenges/current_score.json +++ b/tests/integration/challenges/current_score.json @@ -45,4 +45,4 @@ "max_level_beaten": 1 } } -} \ No newline at end of file +}