Cache Xcode derived data and SPM packages for unit tests

This commit is contained in:
Stefan Ceriu 2024-03-22 15:56:00 +02:00 committed by Stefan Ceriu
parent 1d950fa803
commit d65199a614

View File

@ -14,9 +14,8 @@ jobs:
runs-on: macos-14 runs-on: macos-14
concurrency: concurrency:
# When running on develop, use the sha to allow all runs of this workflow to run concurrently. # Only allow a single run of this workflow on each branch, automatically cancelling older runs.
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs. group: ${{ format('unit-tests-{0}', github.ref) }}
group: ${{ github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }}
cancel-in-progress: true cancel-in-progress: true
steps: steps:
@ -24,6 +23,11 @@ jobs:
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ github.event.pull_request.head.sha }}
- uses: irgaly/xcode-cache@v1
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.ref }}
restore-keys: xcode-cache-deriveddata-${{ github.workflow }}-${{ github.ref }}
- uses: actions/cache@v3 - uses: actions/cache@v3
with: with:
path: vendor/bundle path: vendor/bundle