CI: non-remote GH Actions now use a python venv (#16789)

This commit is contained in:
Joao Gante
2022-04-18 09:47:38 +01:00
committed by GitHub
parent dee6f01636
commit 02de7a8e7f
4 changed files with 36 additions and 17 deletions

View File

@@ -16,17 +16,19 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Loading cache.
- name: Load cached virtual environment
uses: actions/cache@v2
id: cache
with:
path: ~/.cache/pip
key: v1-metadata-${{ hashFiles('setup.py') }}
path: ~/venv/
key: v2-metadata-${{ hashFiles('setup.py') }}
- name: Setup environment
run: |
. ~/venv/bin/activate
pip install git+https://github.com/huggingface/transformers#egg=transformers[dev]
- name: Update metadata
run: |
. ~/venv/bin/activate
python utils/update_metadata.py --token ${{ secrets.SYLVAIN_HF_TOKEN }} --commit_sha ${{ github.sha }}