From d7a9a8db768d9f1fa9db0b2137e99722f8b74010 Mon Sep 17 00:00:00 2001 From: Timothy Stewart Date: Mon, 22 Jan 2024 19:53:51 -0600 Subject: [PATCH] fix(ci): fix molecule --- .github/workflows/cache.yml | 34 ++++++++++++++++++---------------- .github/workflows/test.yml | 29 ++++++----------------------- 2 files changed, 24 insertions(+), 39 deletions(-) diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 9b4a83a..c4635d2 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -47,16 +47,16 @@ jobs: # ansible-galaxy install -r collections/requirements.yml # echo "::endgroup::" - # - name: Cache Vagrant boxes - # id: cache-vagrant - # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # lookup-only: true #if it exists, we don't need to restore and can skip the next step - # path: | - # ~/.vagrant.d/boxes - # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - # restore-keys: | - # vagrant-boxes + - name: Cache Vagrant boxes + id: cache-vagrant + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + lookup-only: true #if it exists, we don't need to restore and can skip the next step + path: | + ~/.vagrant.d/boxes + key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} + restore-keys: | + vagrant-boxes - name: Configure Homebrew cache uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 @@ -81,9 +81,11 @@ jobs: vagrant --version vboxmanage --version - # - 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. - # if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step - # run: ./.github/download-boxes.sh + - 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. + if: steps.cache-vagrant.outputs.cache-hit != 'true' # only run if false since this is just a cache step + run: | + ./.github/download-boxes.sh + vagrant box list diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f762d7..0ac51a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,29 +58,12 @@ jobs: vagrant --version vboxmanage --version - # - name: Cache Vagrant boxes - # id: cache-vagrant - # uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - # with: - # path: | - # ~/.vagrant.d/boxes - # key: vagrant-boxes-${{ hashFiles('**/molecule.yml') }} - # 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: 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 run: |