mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 13:34:54 +01:00
Cache virtualenv instead of pip cache between CI runs (#2759)
This commit is contained in:
parent
4e448b21ff
commit
d50bdf619f
1 changed files with 12 additions and 7 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
@ -78,18 +78,23 @@ jobs:
|
||||||
with:
|
with:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
|
|
||||||
- name: Cache pip modules
|
- name: Cache virtualenv
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pip
|
path: .venv
|
||||||
key: pip-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements*.txt') }}
|
key: venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements*.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
pip-${{ steps.python.outputs.python-version }}-
|
venv-${{ steps.python.outputs.python-version }}-
|
||||||
|
|
||||||
- name: Set up python environment
|
- name: Set up virtualenv
|
||||||
run: |
|
run: |
|
||||||
pip3 install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
|
python -m venv .venv
|
||||||
pip3 install -e .
|
source .venv/bin/activate
|
||||||
|
pip install -U pip
|
||||||
|
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
|
||||||
|
pip install -e .
|
||||||
|
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
|
||||||
|
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV
|
||||||
|
|
||||||
# Use per check platformio cache because checks use different parts
|
# Use per check platformio cache because checks use different parts
|
||||||
- name: Cache platformio
|
- name: Cache platformio
|
||||||
|
|
Loading…
Reference in a new issue