From a16739bb9b77c15609eabd0feb194d4ba5949c14 Mon Sep 17 00:00:00 2001 From: Zachary Klosko Date: Fri, 18 Dec 2020 09:35:54 -0500 Subject: [PATCH] Trying out cacheing --- .github/workflows/test-all-Ubuntu.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-all-Ubuntu.yml b/.github/workflows/test-all-Ubuntu.yml index 1a3fb27e6..4ba993b25 100644 --- a/.github/workflows/test-all-Ubuntu.yml +++ b/.github/workflows/test-all-Ubuntu.yml @@ -60,14 +60,31 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: '7.0' - - run: ENVIRONMENT=testing && LIBRETIME_LOG_DIR=/tmp/log/libretime - name: Install prerequisites - run: sudo bash ./.github/scripts/install-xenial.sh + run: | + ENVIRONMENT=testing && LIBRETIME_LOG_DIR=/tmp/log/libretime + sudo bash ./.github/scripts/install-xenial.sh + - uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- - name: Run Python tests run: | pip install --upgrade pip sudo bash ./.github/scripts/python-pkg-install.sh sudo bash ./.github/scripts/python-pkg-test.sh + - name: Get Composer Cache Directory + id: composer-cache + run: | + echo "::set-output name=dir::$(composer config cache-files-dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- - name: Run PHP tests run: | composer install --no-progress --dev