@@ -3,25 +3,25 @@ name: CI
3
3
on :
4
4
push :
5
5
branches :
6
- - ' ** '
7
- - ' !main'
8
- - ' !develop'
9
- - ' !hotfix/**'
10
- - ' !release/**'
6
+ - " ** "
7
+ - " !main"
8
+ - " !develop"
9
+ - " !hotfix/**"
10
+ - " !release/**"
11
11
workflow_dispatch :
12
12
inputs :
13
13
force_android :
14
- description : ' Force Android'
14
+ description : " Force Android"
15
15
required : false
16
16
default : false
17
17
type : boolean
18
18
force_shared :
19
- description : ' Force shared'
19
+ description : " Force shared"
20
20
required : false
21
21
default : false
22
22
type : boolean
23
23
force_ios :
24
- description : ' Force iOS'
24
+ description : " Force iOS"
25
25
required : false
26
26
default : false
27
27
type : boolean
42
42
steps :
43
43
- name : Checkout
44
44
45
-
45
+
46
46
- name : Gradle Wrapper Validation
47
47
uses : gradle/actions/wrapper-validation@v4
48
48
@@ -63,24 +63,24 @@ jobs:
63
63
timeout-minutes : 10
64
64
65
65
steps :
66
- - name : Checkout
67
-
66
+ - name : Checkout
67
+
68
68
69
- - name : Setup CI
70
- uses : ./.github/actions/setup-android
69
+ - name : Setup CI
70
+ uses : ./.github/actions/setup-android
71
71
72
- - name : Run ktlint
73
- run : ./gradlew setUserHome ktlintCheck --stacktrace
74
- env :
75
- GITHUB_USER : ${{ github.actor }}
76
- GITHUB_PERSONAL_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72
+ - name : Run ktlint
73
+ run : ./gradlew setUserHome ktlintCheck --stacktrace
74
+ env :
75
+ GITHUB_USER : ${{ github.actor }}
76
+ GITHUB_PERSONAL_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
77
77
78
- - name : Upload SARIF
79
- uses : github/codeql-action/upload-sarif@v3
80
- if : success() || failure()
81
- with :
82
- sarif_file : shared/build/reports/ktlint
83
- category : ktlint
78
+ - name : Upload SARIF
79
+ uses : github/codeql-action/upload-sarif@v3
80
+ if : success() || failure()
81
+ with :
82
+ sarif_file : shared/build/reports/ktlint
83
+ category : ktlint
84
84
85
85
detekt :
86
86
needs : files-changed
@@ -90,22 +90,22 @@ jobs:
90
90
timeout-minutes : 10
91
91
92
92
steps :
93
- - name : Checkout
94
-
95
-
96
- - name : Setup CI
97
- uses : ./.github/actions/setup-android
98
-
99
- - name : Run detekt
100
- run : ./gradlew detekt
101
-
102
- - name : Upload SARIF
103
- uses : github/codeql-action/upload-sarif@v3
104
- if : success() || failure()
105
- with :
106
- sarif_file : build/reports/detekt/detekt.sarif
107
- category : detekt
108
-
93
+ - name : Checkout
94
+
95
+
96
+ - name : Setup CI
97
+ uses : ./.github/actions/setup-android
98
+
99
+ - name : Run detekt
100
+ run : ./gradlew detekt
101
+
102
+ - name : Upload SARIF
103
+ uses : github/codeql-action/upload-sarif@v3
104
+ if : success() || failure()
105
+ with :
106
+ sarif_file : build/reports/detekt/detekt.sarif
107
+ category : detekt
108
+
109
109
swiftlint :
110
110
needs : files-changed
111
111
if : ${{ needs.files-changed.outputs.ios == 'true' || needs.files-changed.outputs.shared == 'true' }}
@@ -120,26 +120,26 @@ jobs:
120
120
- name : Setup Ruby
121
121
122
122
with :
123
- ruby-version : ' 3.3.0'
123
+ ruby-version : " 3.3.0"
124
124
bundler-cache : true
125
- working-directory : ' ./iosHyperskillApp'
125
+ working-directory : " ./iosHyperskillApp"
126
126
127
127
- name : Cache Pods
128
128
129
129
id : cache-pods
130
130
with :
131
- path : ' ./iosHyperskillApp/Pods'
131
+ path : " ./iosHyperskillApp/Pods"
132
132
key : ${{ runner.os }}-pods-${{ hashFiles('iosHyperskillApp/Podfile.lock') }}
133
133
restore-keys : |
134
134
${{ runner.os }}-pods-
135
135
136
136
- name : Install Pods
137
137
if : steps.cache-pods.outputs.cache-hit != 'true'
138
- working-directory : ' ./iosHyperskillApp'
138
+ working-directory : " ./iosHyperskillApp"
139
139
run : bundle exec pod install
140
140
141
141
- name : Run SwiftLint
142
- working-directory : ' ./iosHyperskillApp'
142
+ working-directory : " ./iosHyperskillApp"
143
143
run : ./lint.sh
144
144
145
145
shared-unit-testing :
@@ -150,21 +150,21 @@ jobs:
150
150
timeout-minutes : 30
151
151
152
152
steps :
153
- - name : Checkout
154
-
155
-
156
- - name : Setup CI
157
- id : setup
158
- uses : ./.github/actions/setup-android
159
- with :
160
- git-crypt-key : ${{ secrets.GIT_CRYPT_KEY }}
161
-
162
- - name : Run unit tests
163
- run : ./gradlew shared:testDebugUnitTest
164
- env :
165
- IS_GIT_CRYPT_UNLOCKED : ${{ steps.setup.outputs.is-git-crypt-unlocked }}
166
- GITHUB_USER : ${{ github.actor }}
167
- GITHUB_PERSONAL_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
153
+ - name : Checkout
154
+
155
+
156
+ - name : Setup CI
157
+ id : setup
158
+ uses : ./.github/actions/setup-android
159
+ with :
160
+ git-crypt-key : ${{ secrets.GIT_CRYPT_KEY }}
161
+
162
+ - name : Run unit tests
163
+ run : ./gradlew shared:testDebugUnitTest
164
+ env :
165
+ IS_GIT_CRYPT_UNLOCKED : ${{ steps.setup.outputs.is-git-crypt-unlocked }}
166
+ GITHUB_USER : ${{ github.actor }}
167
+ GITHUB_PERSONAL_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
168
168
169
169
android-unit-testing :
170
170
needs : [files-changed, ktlint, detekt]
@@ -174,28 +174,28 @@ jobs:
174
174
timeout-minutes : 30
175
175
176
176
steps :
177
- - name : Checkout
178
-
179
-
180
- - name : Setup CI
181
- id : setup
182
- uses : ./.github/actions/setup-android
183
- with :
184
- git-crypt-key : ${{ secrets.GIT_CRYPT_KEY }}
185
-
186
- - name : Run unit tests
187
- run : ./gradlew androidHyperskillApp:testDebugUnitTest
188
- env :
189
- IS_GIT_CRYPT_UNLOCKED : ${{ steps.setup.outputs.is-git-crypt-unlocked }}
190
- GITHUB_USER : ${{ github.actor }}
191
- GITHUB_PERSONAL_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
177
+ - name : Checkout
178
+
179
+
180
+ - name : Setup CI
181
+ id : setup
182
+ uses : ./.github/actions/setup-android
183
+ with :
184
+ git-crypt-key : ${{ secrets.GIT_CRYPT_KEY }}
185
+
186
+ - name : Run unit tests
187
+ run : ./gradlew androidHyperskillApp:testDebugUnitTest
188
+ env :
189
+ IS_GIT_CRYPT_UNLOCKED : ${{ steps.setup.outputs.is-git-crypt-unlocked }}
190
+ GITHUB_USER : ${{ github.actor }}
191
+ GITHUB_PERSONAL_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
192
192
193
193
build-ios :
194
194
needs : swiftlint
195
195
name : Build iOS
196
196
runs-on : macos-14
197
197
timeout-minutes : 30
198
-
198
+
199
199
steps :
200
200
- name : Checkout
201
201
@@ -207,10 +207,17 @@ jobs:
207
207
git-crypt-key : ${{ secrets.GIT_CRYPT_KEY }}
208
208
209
209
- name : Build
210
- working-directory : ' ./iosHyperskillApp'
210
+ working-directory : " ./iosHyperskillApp"
211
211
run : bundle exec fastlane build install_pods:false
212
212
env :
213
213
FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT : 60
214
214
IS_GIT_CRYPT_UNLOCKED : ${{ steps.setup.outputs.is-git-crypt-unlocked }}
215
215
GITHUB_USER : ${{ github.actor }}
216
216
GITHUB_PERSONAL_ACCESS_TOKEN : ${{ secrets.GITHUB_TOKEN }}
217
+
218
+ - name : Upload error log
219
+ if : ${{ failure() }}
220
+ uses : actions/upload-artifact@v4
221
+ with :
222
+ name : iosHyperskillApp-iosHyperskillApp.log
223
+ path : /Users/runner/Library/Logs/gym/iosHyperskillApp-iosHyperskillApp.log
0 commit comments