|
5 | 5 | branches:
|
6 | 6 | - main
|
7 | 7 | jobs:
|
8 |
| - test: |
9 |
| - name: Test on macOS |
| 8 | + validation: |
| 9 | + name: Validation |
10 | 10 | runs-on: macos-11
|
11 | 11 | strategy:
|
12 | 12 | matrix:
|
13 | 13 | xcode_version:
|
14 |
| - - 12.4 |
15 | 14 | - 12.5.1
|
16 | 15 | env:
|
17 | 16 | DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
|
18 | 17 | steps:
|
19 | 18 | - uses: actions/checkout@v2
|
20 |
| - - name: Show environments |
21 |
| - run: | |
22 |
| - swift --version |
23 |
| - xcodebuild -version |
24 |
| -
|
25 |
| - - name: Get npm cache |
26 |
| - id: npm-cache |
27 |
| - uses: actions/cache@v2 |
28 |
| - with: |
29 |
| - path: node_modules |
30 |
| - key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }} |
31 |
| - restore-keys: ${{ runner.os }}-0-npm- |
32 | 19 |
|
33 | 20 | - name: Get ruby gem cache
|
34 | 21 | id: gem-cache
|
|
45 | 32 | key: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-${{ hashFiles('Tools/Package.resolved') }}
|
46 | 33 | restore-keys: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-
|
47 | 34 |
|
48 |
| - - name: Get CocoaPods cache |
49 |
| - id: cocoapods-cache |
50 |
| - uses: actions/cache@v2 |
51 |
| - with: |
52 |
| - path: Example/Pods |
53 |
| - key: ${{ runner.os }}-1-cocoapods-${{ hashFiles('Example/Podfile.lock') }} |
54 |
| - restore-keys: ${{ runner.os }}-1-cocoapods- |
55 |
| - |
56 |
| - - name: Install npm packages |
57 |
| - if: steps.npm-cache.cache.outputs.cache-hit != 'true' |
58 |
| - run: make npm |
59 |
| - |
60 | 35 | - name: Install ruby gems
|
61 | 36 | if: steps.gem-cache.cache.outputs.cache-hit != 'true'
|
62 | 37 | run: make gem
|
|
68 | 43 | make lint
|
69 | 44 | make pod-lib-lint
|
70 | 45 |
|
| 46 | + test: |
| 47 | + name: Test on macOS |
| 48 | + runs-on: macos-11 |
| 49 | + strategy: |
| 50 | + matrix: |
| 51 | + xcode_version: |
| 52 | + - 12.4 |
| 53 | + - 12.5.1 |
| 54 | + env: |
| 55 | + DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v2 |
| 58 | + |
| 59 | + - name: Show environments |
| 60 | + run: | |
| 61 | + swift --version |
| 62 | + xcodebuild -version |
| 63 | +
|
| 64 | + - name: Get npm cache |
| 65 | + id: npm-cache |
| 66 | + uses: actions/cache@v2 |
| 67 | + with: |
| 68 | + path: node_modules |
| 69 | + key: ${{ runner.os }}-0-npm-${{ hashFiles('package-lock.json') }} |
| 70 | + restore-keys: ${{ runner.os }}-0-npm- |
| 71 | + |
| 72 | + - name: Install npm packages |
| 73 | + if: steps.npm-cache.cache.outputs.cache-hit != 'true' |
| 74 | + run: make npm |
| 75 | + |
71 | 76 | - name: Generate snapshots
|
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 |
| 77 | + working-directory: Example |
| 78 | + run: xcodebuild test -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c |
73 | 79 |
|
74 | 80 | - name: Visual regression test
|
75 | 81 | if: matrix.xcode_version == '12.5.1'
|
|
0 commit comments