Changing params, such as exclusions or folder, resets the files cache… #35
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
macos: | |
name: MacOS - Swift ${{ matrix.swift }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-13] | |
swift: ["5.9"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: swift-actions/setup-swift@v1 | |
with: | |
swift-version: ${{ matrix.swift }} | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- uses: actions/checkout@v4 | |
# https://github.com/actions/cache/blob/main/examples.md#swift---swift-package-manager | |
- uses: actions/cache@v4 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
- name: Build | |
run: swift build | |
- name: Run MacOS Tests | |
run: swift test | |
ios: | |
name: iOS - Swift ${{ matrix.swift }} on ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-13] | |
swift: ["5.9"] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: swift-actions/setup-swift@v1 | |
with: | |
swift-version: ${{ matrix.swift }} | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- uses: actions/checkout@v3 | |
# https://github.com/actions/cache/blob/main/examples.md#swift---swift-package-manager | |
- uses: actions/cache@v3 | |
with: | |
path: .build | |
key: ${{ matrix.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ matrix.os }}-spm- | |
- name: Build | |
run: xcodebuild build -scheme Harmonize-Package -destination "OS=18.0,name=iPhone 16" | |
- name: Run iOS Tests | |
run: xcodebuild test-without-building -scheme Harmonize-Package -destination "name=iPhone 16" |