From c649682240eb040aeb15dad48f8b865dda5b1962 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: I0dd7b1b31e5354a76e6a57c12b2692e3cedd3b2b --- .github/actions/install-meltingpot/action.yml | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/.github/actions/install-meltingpot/action.yml b/.github/actions/install-meltingpot/action.yml index 34778f1a..62f894f5 100644 --- a/.github/actions/install-meltingpot/action.yml +++ b/.github/actions/install-meltingpot/action.yml @@ -38,34 +38,44 @@ runs: meltingpot/assets venv key: install-meltingpot-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }} - restore-keys: | - install-meltingpot-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}- - - name: Install Melting Pot + - 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 Melting Pot installation - if: steps.restore.outputs.cache-hit != 'true' - uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: | - meltingpot/assets - 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 Melting Pot + 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 Melting Pot installation + if: steps.restore.outputs.cache-hit != 'true' + uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + with: + path: | + meltingpot/assets + venv + key: ${{ steps.restore.outputs.cache-primary-key }}