Skip to content

Commit c649682

Browse files
jagapioucopybara-github
authored andcommitted
add better cache debugging to GitHub install action
PiperOrigin-RevId: 673774924 Change-Id: I0dd7b1b31e5354a76e6a57c12b2692e3cedd3b2b
1 parent 4ec084a commit c649682

File tree

1 file changed

+25
-15
lines changed

1 file changed

+25
-15
lines changed

.github/actions/install-meltingpot/action.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,34 +38,44 @@ runs:
3838
meltingpot/assets
3939
venv
4040
key: install-meltingpot-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('setup.py') }}
41-
restore-keys: |
42-
install-meltingpot-${{ steps.os-info.outputs.name }}-${{ steps.os-info.outputs.version }}-py${{ steps.setup-python.outputs.python-version }}-
4341

44-
- name: Install Melting Pot
42+
- name: Create venv
4543
if: steps.restore.outputs.cache-hit != 'true'
4644
shell: bash
4745
run: |
4846
python -m venv venv
49-
source venv/bin/activate
50-
pip install --editable .[dev]
5147
52-
- name: Save Melting Pot installation
53-
if: steps.restore.outputs.cache-hit != 'true'
54-
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
55-
with:
56-
path: |
57-
meltingpot/assets
58-
venv
59-
key: ${{ steps.restore.outputs.cache-primary-key }}
60-
61-
- name: Activate virtual environment
48+
- name: Activate venv
6249
shell: bash
6350
run: |
6451
echo "${PWD}/venv/bin" >> $GITHUB_PATH
6552
53+
- name: Install Melting Pot
54+
if: steps.restore.outputs.cache-hit != 'true'
55+
shell: bash
56+
run: |
57+
pip install --editable .[dev]
58+
6659
- name: Show installation
6760
shell: bash
6861
run: |
6962
which python
63+
python --version
7064
which pip
65+
pip --version
66+
which pylint
67+
pylint --version
68+
which pytest
69+
pytest --version
70+
which pytype
71+
pytype --version
7172
pip list
73+
74+
- name: Save Melting Pot installation
75+
if: steps.restore.outputs.cache-hit != 'true'
76+
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
77+
with:
78+
path: |
79+
meltingpot/assets
80+
venv
81+
key: ${{ steps.restore.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)