forked from google-deepmind/meltingpot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache examples venv in GitHub actions for faster test runs
PiperOrigin-RevId: 673813732 Change-Id: Ideb3963d62b203a75112d93bd85c5390c129e1cd
- Loading branch information
1 parent
c649682
commit bb2a70b
Showing
2 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,57 @@ | ||
name: install-examples | ||
|
||
inputs: | ||
python-version: | ||
description: Python version | ||
required: false | ||
default: '3.11' | ||
type: string | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Melting Pot | ||
id: install-meltingpot | ||
uses: ./.github/actions/install-meltingpot | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Restore Examples installation | ||
id: restore | ||
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 | ||
with: | ||
path: venv | ||
key: install-examples-${{ steps.install-meltingpot.outputs.key }}-${{ hashFiles('examples/requirements.txt') }} | ||
|
||
- name: Activate venv | ||
shell: bash | ||
run: | | ||
echo "${PWD}/venv/bin" >> $GITHUB_PATH | ||
- name: Install requirements for examples | ||
if: steps.restore.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: pip install -r examples/requirements.txt | ||
run: | | ||
pip install -r examples/requirements.txt | ||
- name: Show installed dependencies | ||
- name: Show installation | ||
shell: bash | ||
run: pip list | ||
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 Examples installation | ||
if: steps.restore.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 | ||
with: | ||
path: venv | ||
key: ${{ steps.restore.outputs.cache-primary-key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters