|
1 | 1 | name: Unit Test |
2 | 2 |
|
3 | | -on: |
| 3 | +on: |
4 | 4 | pull_request: |
5 | 5 | paths: |
6 | 6 | - "**.swift" |
|
9 | 9 | - "**.h" |
10 | 10 | - "**.podspec" |
11 | 11 | - "Podfile" |
| 12 | + - "Podfile.lock" |
12 | 13 | - "test.yml" |
13 | 14 | jobs: |
14 | | - iOS: |
15 | | - name: Test iOS |
| 15 | + swiftpm: |
| 16 | + name: Test iOS (swiftpm) |
16 | 17 | runs-on: macOS-latest |
17 | 18 | env: |
18 | | - DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer |
19 | | - strategy: |
20 | | - matrix: |
21 | | - destination: [ |
22 | | - 'platform=iOS Simulator,OS=13.1,name=iPhone 11' |
23 | | - ] |
| 19 | + DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer |
24 | 20 | steps: |
25 | 21 | - name: Checkout |
26 | 22 | uses: actions/checkout@master |
27 | | - - name: iOS - ${{ matrix.destination }} |
| 23 | + - name: iOS - Swift PM |
28 | 24 | run: | |
29 | 25 | pod install |
30 | | - set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty |
31 | | - bash <(curl -s https://codecov.io/bash) |
32 | | - env: |
33 | | - destination: ${{ matrix.destination }} |
34 | | - - name: Upload Code Coverage |
35 | | - run: | |
36 | | - bash <(curl -s https://codecov.io/bash) |
37 | | - env: |
38 | | - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
39 | | - iOS-legacy: |
| 26 | + set -o pipefail && swift test --parallel |
| 27 | + iOS: |
40 | 28 | name: Test iOS |
41 | 29 | runs-on: macOS-latest |
42 | 30 | env: |
43 | | - DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer |
| 31 | + DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer |
44 | 32 | strategy: |
45 | 33 | matrix: |
46 | 34 | destination: [ |
47 | | - 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7' |
| 35 | + 'platform=iOS Simulator,OS=14.4,name=iPhone 12' |
48 | 36 | ] |
49 | 37 | steps: |
50 | 38 | - name: Checkout |
51 | 39 | uses: actions/checkout@master |
| 40 | + |
52 | 41 | - name: iOS - ${{ matrix.destination }} |
53 | 42 | run: | |
54 | | - xcversion simulators --install='iOS 10.3.1' |
55 | 43 | pod install |
56 | | - set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty |
57 | | - bash <(curl -s https://codecov.io/bash) |
58 | | - env: |
59 | | - destination: ${{ matrix.destination }} |
60 | | - - name: Upload Code Coverage |
61 | | - run: | |
| 44 | + set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -configuration "Debug" -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES | xcpretty |
62 | 45 | bash <(curl -s https://codecov.io/bash) |
63 | 46 | env: |
64 | | - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
65 | | - iOS-legacy: |
66 | | - name: Test iOS |
67 | | - runs-on: macOS-latest |
68 | | - env: |
69 | | - DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer |
70 | | - strategy: |
71 | | - matrix: |
72 | | - destination: [ |
73 | | - 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7' |
74 | | - ] |
75 | | - steps: |
76 | | - - name: Checkout |
77 | | - uses: actions/checkout@master |
78 | | - - name: iOS - ${{ matrix.destination }} |
79 | | - run: | |
80 | | - xcversion simulators --install='iOS 10.3.1' |
81 | | - pod install |
82 | | - set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty |
83 | | - bash <(curl -s https://codecov.io/bash) |
84 | | - env: |
85 | 47 | destination: ${{ matrix.destination }} |
86 | 48 | - name: Upload Code Coverage |
87 | 49 | run: | |
88 | 50 | bash <(curl -s https://codecov.io/bash) |
89 | 51 | env: |
90 | 52 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 53 | + # iOS-legacy: |
| 54 | + # name: Test iOS |
| 55 | + # runs-on: macOS-latest |
| 56 | + # env: |
| 57 | + # DEVELOPER_DIR: /Applications/Xcode_10.3.1.app/Contents/Developer |
| 58 | + # strategy: |
| 59 | + # matrix: |
| 60 | + # destination: [ |
| 61 | + # 'platform=iOS Simulator,OS=10.3.1,name=iPhone 7' |
| 62 | + # ] |
| 63 | + # steps: |
| 64 | + # - name: Checkout |
| 65 | + # uses: actions/checkout@master |
| 66 | + # - name: iOS - ${{ matrix.destination }} |
| 67 | + # run: | |
| 68 | + # xcversion simulators --install='iOS 10.3.1' |
| 69 | + # pod install |
| 70 | + # set -o pipefail && xcodebuild clean test -workspace Hero.xcworkspace -scheme Hero -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES -enableCodeCoverage YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty |
| 71 | + # bash <(curl -s https://codecov.io/bash) |
| 72 | + # env: |
| 73 | + # destination: ${{ matrix.destination }} |
| 74 | + # - name: Upload Code Coverage |
| 75 | + # run: | |
| 76 | + # bash <(curl -s https://codecov.io/bash) |
| 77 | + # env: |
| 78 | + # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
91 | 79 | tvOS: |
92 | 80 | name: Test tvOS |
93 | 81 | runs-on: macOS-latest |
94 | 82 | env: |
95 | | - DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer |
| 83 | + DEVELOPER_DIR: /Applications/Xcode_12.4.app/Contents/Developer |
96 | 84 | strategy: |
97 | 85 | matrix: |
98 | 86 | destination: [ |
99 | | - 'platform=tvOS Simulator,OS=13.0,name=Apple TV 4K' |
| 87 | + 'platform=tvOS Simulator,OS=14.3,name=Apple TV 4K' |
100 | 88 | ] |
101 | 89 |
|
102 | 90 | steps: |
|
105 | 93 | - name: tvOS - ${{ matrix.destination }} |
106 | 94 | run: | |
107 | 95 | pod install |
108 | | - set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme "Hero (tvOS)" -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO | xcpretty |
109 | | - env: |
| 96 | + set -o pipefail && xcodebuild clean build -workspace Hero.xcworkspace -scheme "Hero (tvOS)" -destination "${destination}" -parallelizeTargets -showBuildTimingSummary -enableThreadSanitizer YES CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=YES | xcpretty |
| 97 | + env: |
110 | 98 | destination: ${{ matrix.destination }} |
0 commit comments