generated from nimblehq/git-template
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (76 loc) · 2.34 KB
/
ios_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Running iOS tests
on:
pull_request:
types: [opened, reopened, edited, synchronize]
permissions:
actions: write
checks: write
contents: write
issues: write
pull-requests: write
statuses: write
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ios_test:
name: Running tests in iOS
runs-on: macos-latest
defaults:
run:
working-directory: ./sample/ios
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v3
id: bunlderCache
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'adopt'
java-version: '17'
- name: Remove the old sample project
run: rm -rf sample
working-directory: ./
- name: Generate the new sample project
run: sh make.sh --bundle-id co.nimble.kmm.sample --bundle-id-staging co.nimble.kmm.sample.staging --project-name sample --ios-version 14.0
working-directory: ./
- name: Bundle install
run: bundle install --path vendor/bundle
- name: Cache Pods
uses: actions/cache@v3
id: cocoapodCache
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Generate KMM frameworks for Cocoapods
run: |
pwd
cd ..
pwd
./gradlew generateDummyFramework
- name: Install Pods Dependencies
run: bundle exec pod install
- name: Build and Test
run: bundle exec fastlane buildAndTest
env:
CI: true
- name: Clean up previous code coverage report
run: bundle exec fastlane cleanUpOutput
- name: Review pull request by Danger
uses: MeilCli/danger-action@v5
with:
plugins_file: 'ios/Gemfile'
install_path: 'ios/vendor/bundle'
danger_file: 'ios/Dangerfile'
danger_id: 'danger-pr'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}