From 5c92d254fb8f04642c47be44f6fdc14e6571d842 Mon Sep 17 00:00:00 2001 From: John Agapiou Date: Thu, 12 Sep 2024 03:46:50 -0700 Subject: [PATCH] add better cache debugging to GitHub install action PiperOrigin-RevId: 673774924 Change-Id: I305afeffb5ead5f9ea2c8e3c8fc66089b837e18d --- .github/actions/install-concordia/action.yml | 36 +++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/actions/install-concordia/action.yml b/.github/actions/install-concordia/action.yml index 42942a54..521dcce3 100644 --- a/.github/actions/install-concordia/action.yml +++ b/.github/actions/install-concordia/action.yml @@ -36,32 +36,42 @@ runs: with: path: venv key: install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }} - restore-keys: | - install-concordia-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}- - - name: Install Concordia + - name: Create venv if: steps.restore.outputs.cache-hit != 'true' shell: bash run: | python -m venv venv - source venv/bin/activate - pip install --editable .[dev] - - name: Save Concordia installation - if: steps.restore.outputs.cache-hit != 'true' - uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: venv - key: ${{ steps.restore.outputs.cache-primary-key }} - - - name: Activate virtual environment + - name: Activate venv shell: bash run: | echo "${PWD}/venv/bin" >> $GITHUB_PATH + - name: Install Concordia + if: steps.restore.outputs.cache-hit != 'true' + shell: bash + run: | + pip install --editable .[dev] + - name: Show installation shell: bash run: | which python + python --version which pip + pip --version + which pylint + pylint --version + which pytest + pytest --version + which pytype + pytype --version pip list + + - name: Save Concordia installation + if: steps.restore.outputs.cache-hit != 'true' + uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + with: + path: venv + key: ${{ steps.restore.outputs.cache-primary-key }}