77jobs :
88 test :
99 name : Test on macOS
10- runs-on : macOS -11.0
10+ runs-on : macos -11
1111 strategy :
1212 matrix :
1313 xcode_version :
14- - " 12.2"
14+ - 12.4
15+ - 12.5.1
1516 env :
1617 DEVELOPER_DIR : /Applications/Xcode_${{ matrix.xcode_version }}.app
1718 steps :
2122 swift --version
2223 xcodebuild -version
2324
24- - name : Get ruby gem cache
25- id : gem-cache
26- uses : actions/cache@v2
27- with :
28- path : vendor/bundle
29- key : ${{ runner.os }}-1-gem-${{ hashFiles('Gemfile.lock') }}
30- restore-keys : ${{ runner.os }}-1-gem-
31-
3225 - name : Get npm cache
3326 id : npm-cache
3427 uses : actions/cache@v2
@@ -37,18 +30,26 @@ jobs:
3730 key : ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }}
3831 restore-keys : ${{ runner.os }}-0-npm-
3932
33+ - name : Get ruby gem cache
34+ id : gem-cache
35+ uses : actions/cache@v2
36+ with :
37+ path : vendor/bundle
38+ key : ${{ runner.os }}-1-gem-${{ hashFiles('Gemfile.lock') }}
39+ restore-keys : ${{ runner.os }}-1-gem-
40+
4041 - name : Get SwiftPM cache
4142 uses : actions/cache@v2
4243 with :
4344 path : Tools/.build
44- key : ${{ runner.os }}-${{ matrix.xcode_version }}-2 -spm-${{ hashFiles('Tools/Package.resolved') }}
45- restore-keys : ${{ runner.os }}-${{ matrix.xcode_version }}-2 -spm-
45+ key : ${{ runner.os }}-${{ matrix.xcode_version }}-1 -spm-${{ hashFiles('Tools/Package.resolved') }}
46+ restore-keys : ${{ runner.os }}-${{ matrix.xcode_version }}-1 -spm-
4647
4748 - name : Get CocoaPods cache
4849 id : cocoapods-cache
4950 uses : actions/cache@v2
5051 with :
51- path : Pods
52+ path : Example/ Pods
5253 key : ${{ runner.os }}-1-cocoapods-${{ hashFiles('Example/Podfile.lock') }}
5354 restore-keys : ${{ runner.os }}-1-cocoapods-
5455
@@ -60,18 +61,18 @@ jobs:
6061 if : steps.gem-cache.cache.outputs.cache-hit != 'true'
6162 run : make gem
6263
63- - name : Podspec lint
64- run : make pod-lib-lint
65-
6664 - name : Validation
67- run : make all && [ -z "$(git status --porcelain)" ] && make lint
68- env :
69- SPM_FORCE_BUILD : 1
65+ if : matrix.xcode_version == '12.5.1'
66+ run : |
67+ make all && [ -z "$(git status --porcelain)" ]
68+ make lint
69+ make pod-lib-lint
7070
7171 - name : Generate snapshots
72- run : set -o pipefail && xcodebuild build-for-testing test-without-building -workspace Example/Example.xcworkspace -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
72+ run : xcodebuild test -workspace Example/Example.xcworkspace -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
7373
7474 - name : Visual regression test
75+ if : matrix.xcode_version == '12.5.1'
7576 run : npx percy upload Example/Snapshots
7677 env :
7778 PERCY_TOKEN : ${{ secrets.PERCY_TOKEN }}
0 commit comments