From 240246075a0ea866d06c0c58fcd789b47d5afe81 Mon Sep 17 00:00:00 2001 From: craig8 Date: Wed, 2 Dec 2020 15:45:03 -0800 Subject: [PATCH] Update cache if necessary install dependencies. --- .github/workflows/build-dependency-cache.yml | 2 +- .github/workflows/pytest-auth.yml | 30 ++++++-------------- .github/workflows/pytest-testutils.yml | 27 +++++------------- 3 files changed, 17 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build-dependency-cache.yml b/.github/workflows/build-dependency-cache.yml index 1b3403e146..a291943c7a 100644 --- a/.github/workflows/build-dependency-cache.yml +++ b/.github/workflows/build-dependency-cache.yml @@ -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 diff --git a/.github/workflows/pytest-auth.yml b/.github/workflows/pytest-auth.yml index 4c04e7e72e..f5642bb030 100644 --- a/.github/workflows/pytest-auth.yml +++ b/.github/workflows/pytest-auth.yml @@ -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 diff --git a/.github/workflows/pytest-testutils.yml b/.github/workflows/pytest-testutils.yml index 93779a49d4..efe3262716 100644 --- a/.github/workflows/pytest-testutils.yml +++ b/.github/workflows/pytest-testutils.yml @@ -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: |