diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 548b822..890ec8a 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -15,6 +15,21 @@ jobs: with: ref: ${{ github.event.pull_request.head.sha }} + - name: Update Homebrew + run: | + brew update --preinstall + echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae + - name: Configure Homebrew cache + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 + with: + path: | + ~/Library/Caches/Homebrew + key: brew-${{ hashFiles('.github/brew-formulae') }} + restore-keys: brew- + - name: Install Homebrew dependencies + run: | + env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + - name: Cache Vagrant boxes uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 with: @@ -24,20 +39,8 @@ jobs: restore-keys: | vagrant-boxes - - name: Update Homebrew - run: | - brew update --preinstall - echo ${{ hashFiles ('"$(brew --repository)"') }} > .github/brew-formulae - - name: Configure Homebrew cache - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # 4.0 - with: - path: | - ~/Library/Caches/Homebrew/virtualbox--* - ~/Library/Caches/Homebrew/vagrant--* - ~/Library/Caches/Homebrew/downloads/*--virtualbox-* - ~/Library/Caches/Homebrew/downloads/*--vagrant-* - key: brew-${{ hashFiles('.github/brew-formulae') }} - restore-keys: brew- - - name: Install Homebrew dependencies - run: | - env HOMEBREW_NO_AUTO_UPDATE=1 brew install virtualbox vagrant + - 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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b7e3c63..499493f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,12 +30,6 @@ jobs: * fdad:bad:ba55::/64 EOF - - 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: Set up Python ${{ env.PYTHON_VERSION }} uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # 2.3.3 id: pip-cache