fix(ci): fix molecule

This commit is contained in:
Timothy Stewart
2024-01-22 19:28:53 -06:00
parent 83c586654f
commit b928c930d5
2 changed files with 37 additions and 21 deletions

View File

@@ -47,16 +47,16 @@ jobs:
# ansible-galaxy install -r collections/requirements.yml # ansible-galaxy install -r collections/requirements.yml
# echo "::endgroup::" # echo "::endgroup::"
- name: Cache Vagrant boxes # - name: Cache Vagrant boxes
id: cache-vagrant # id: cache-vagrant
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
with: # with:
lookup-only: true #if it exists, we don't need to restore and can skip the next step # lookup-only: true #if it exists, we don't need to restore and can skip the next step
path: | # path: |
~/.vagrant.d/boxes # ~/.vagrant.d/boxes
key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }}
restore-keys: | # restore-keys: |
vagrant-boxes # vagrant-boxes
- name: Configure Homebrew cache - name: Configure Homebrew cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
@@ -81,9 +81,9 @@ jobs:
vagrant --version vagrant --version
vboxmanage --version vboxmanage --version
- name: Download Vagrant boxes for all scenarios # - name: Download Vagrant boxes for all scenarios
# To save some cache space, all scenarios share the same cache key. # # To save some cache space, all scenarios share the same cache key.
# On the other hand, this means that the cache contents should be # # On the other hand, this means that the cache contents should be
# the same across all scenarios. This step ensures that. # # the same across all scenarios. This step ensures that.
if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step # if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step
run: ./.github/download-boxes.sh # run: ./.github/download-boxes.sh

View File

@@ -58,13 +58,29 @@ jobs:
vagrant --version vagrant --version
vboxmanage --version vboxmanage --version
- name: Cache Vagrant boxes
- name: Restore vagrant Boxes cache id: cache-vagrant
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
with: with:
path: ~/.vagrant.d/boxes path: |
~/.vagrant.d/boxes
key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }}
fail-on-cache-miss: true restore-keys: |
vagrant-boxes
- name: Download Vagrant boxes for all scenarios
# To save some cache space, all scenarios share the same cache key.
# On the other hand, this means that the cache contents should be
# the same across all scenarios. This step ensures that.
run: ./.github/download-boxes.sh
# - name: Restore vagrant Boxes cache
# uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0
# with:
# path: ~/.vagrant.d/boxes
# key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }}
# fail-on-cache-miss: true
- name: Install dependencies - name: Install dependencies
run: | run: |