Skip to content

Commit

Permalink
Update cache if necessary install dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
craig8 committed Dec 2, 2020
1 parent 725428d commit 2402460
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-dependency-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
if: steps.check_files.outputs.files_exists != 'true'
run: |
pip install wheel
python bootstrap.py --all
python bootstrap.py --all --force
# Only works on default branch of the target repo
# - name: Repository Dispatch
Expand Down
30 changes: 9 additions & 21 deletions .github/workflows/pytest-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,19 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- id: envcache
uses: actions/cache@v2
env:
cache-name: cache-env

- name: Has restored cache
id: check_files
uses: andstor/file-existence-action@v1
with:
# This path is specific to Ubuntu
path: ./env
# Look to see if there is a cache hit for the corresponding requirements file
key: env-${{ matrix.os }}-${{matrix.python-version}}
#-${{hashFiles('requirements.py')}}
# env-${{ matrix.os }}-${{matrix.python-version}}

# restore-keys: |
# env-${{ matrix.os }}-${{matrix.python-version}}

files: "env/bin/activate"

- name: Install dependencies
if: steps.envcache.outputs.cache-hit != 'true'
if: steps.check_files.outputs.files_exists != 'true'
run: |
echo "First cache hit?"
echo "${{steps.envcache.outputs.cache-hit}}"
echo "Second cache hit?"
echo "${{steps.cache.outputs.cache-hit}}"
pip install wheel
python bootstrap.py --all
python bootstrap.py --all --force
- name: Install volttron
run: |
source env/bin/activate
Expand Down
27 changes: 7 additions & 20 deletions .github/workflows/pytest-testutils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,17 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- id: envcache
uses: actions/cache@v2
env:
cache-name: cache-env
- name: Has restored cache
id: check_files
uses: andstor/file-existence-action@v1
with:
# This path is specific to Ubuntu
path: ./env
# Look to see if there is a cache hit for the corresponding requirements file
key: env-${{ matrix.os }}-${{matrix.python-version}}
#-${{hashFiles('requirements.py')}}
# env-${{ matrix.os }}-${{matrix.python-version}}

# restore-keys: |
# env-${{ matrix.os }}-${{matrix.python-version}}

files: "env/bin/activate"

- name: Install dependencies
if: steps.envcache.outputs.cache-hit != 'true'
if: steps.check_files.outputs.files_exists != 'true'
run: |
echo "First cache hit?"
echo "${{steps.envcache.outputs.cache-hit}}"
echo "Second cache hit?"
echo "${{steps.cache.outputs.cache-hit}}"
pip install wheel
python bootstrap.py --all
python bootstrap.py --all --force
- name: Install volttron
run: |
Expand Down

0 comments on commit 2402460

Please sign in to comment.