Skip to content

Commit ca088b0

Browse files
authored
Merge pull request #1 from ngocpd-1250/feat/add_unittest
feat: add CI
2 parents cc99912 + 1f4c21e commit ca088b0

File tree

11 files changed

+669
-3
lines changed

11 files changed

+669
-3
lines changed

.github/workflows/run_test.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Run Unit Tests
2+
run-name: ${{ github.actor }} is running unit tests
3+
4+
on:
5+
push:
6+
branches:
7+
- develop
8+
pull_request:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
build-and-test:
14+
name: Build and test
15+
runs-on: macos-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
- name: Select Xcode version
20+
run: sudo xcode-select -s '/Applications/Xcode_15.0.app/Contents/Developer'
21+
- name: Setup
22+
run: |
23+
brew install xcodegen
24+
bundle install
25+
xcodegen
26+
- name: Test
27+
run: |
28+
bundle exec fastlane test_dev

BaseSwiftUI/Info.plist

-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
<key>CFBundleURLTypes</key>
2424
<array>
2525
<dict>
26-
<key>CFBundleTypeRole</key>
27-
<string>Editor</string>
2826
<key>CFBundleURLSchemes</key>
2927
<array>
3028
<string>testlink</string>

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source "https://rubygems.org"
2+
3+
gem "fastlane"

Gemfile.lock

+220
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
addressable (2.8.7)
9+
public_suffix (>= 2.0.2, < 7.0)
10+
artifactory (3.0.17)
11+
atomos (0.1.3)
12+
aws-eventstream (1.3.0)
13+
aws-partitions (1.950.0)
14+
aws-sdk-core (3.200.0)
15+
aws-eventstream (~> 1, >= 1.3.0)
16+
aws-partitions (~> 1, >= 1.651.0)
17+
aws-sigv4 (~> 1.8)
18+
jmespath (~> 1, >= 1.6.1)
19+
aws-sdk-kms (1.87.0)
20+
aws-sdk-core (~> 3, >= 3.199.0)
21+
aws-sigv4 (~> 1.1)
22+
aws-sdk-s3 (1.155.0)
23+
aws-sdk-core (~> 3, >= 3.199.0)
24+
aws-sdk-kms (~> 1)
25+
aws-sigv4 (~> 1.8)
26+
aws-sigv4 (1.8.0)
27+
aws-eventstream (~> 1, >= 1.0.2)
28+
babosa (1.0.4)
29+
base64 (0.2.0)
30+
claide (1.1.0)
31+
colored (1.2)
32+
colored2 (3.1.2)
33+
commander (4.6.0)
34+
highline (~> 2.0.0)
35+
declarative (0.0.20)
36+
digest-crc (0.6.5)
37+
rake (>= 12.0.0, < 14.0.0)
38+
domain_name (0.6.20240107)
39+
dotenv (2.8.1)
40+
emoji_regex (3.2.3)
41+
excon (0.110.0)
42+
faraday (1.10.3)
43+
faraday-em_http (~> 1.0)
44+
faraday-em_synchrony (~> 1.0)
45+
faraday-excon (~> 1.1)
46+
faraday-httpclient (~> 1.0)
47+
faraday-multipart (~> 1.0)
48+
faraday-net_http (~> 1.0)
49+
faraday-net_http_persistent (~> 1.0)
50+
faraday-patron (~> 1.0)
51+
faraday-rack (~> 1.0)
52+
faraday-retry (~> 1.0)
53+
ruby2_keywords (>= 0.0.4)
54+
faraday-cookie_jar (0.0.7)
55+
faraday (>= 0.8.0)
56+
http-cookie (~> 1.0.0)
57+
faraday-em_http (1.0.0)
58+
faraday-em_synchrony (1.0.0)
59+
faraday-excon (1.1.0)
60+
faraday-httpclient (1.0.1)
61+
faraday-multipart (1.0.4)
62+
multipart-post (~> 2)
63+
faraday-net_http (1.0.1)
64+
faraday-net_http_persistent (1.2.0)
65+
faraday-patron (1.0.0)
66+
faraday-rack (1.0.0)
67+
faraday-retry (1.0.3)
68+
faraday_middleware (1.2.0)
69+
faraday (~> 1.0)
70+
fastimage (2.3.1)
71+
fastlane (2.221.1)
72+
CFPropertyList (>= 2.3, < 4.0.0)
73+
addressable (>= 2.8, < 3.0.0)
74+
artifactory (~> 3.0)
75+
aws-sdk-s3 (~> 1.0)
76+
babosa (>= 1.0.3, < 2.0.0)
77+
bundler (>= 1.12.0, < 3.0.0)
78+
colored (~> 1.2)
79+
commander (~> 4.6)
80+
dotenv (>= 2.1.1, < 3.0.0)
81+
emoji_regex (>= 0.1, < 4.0)
82+
excon (>= 0.71.0, < 1.0.0)
83+
faraday (~> 1.0)
84+
faraday-cookie_jar (~> 0.0.6)
85+
faraday_middleware (~> 1.0)
86+
fastimage (>= 2.1.0, < 3.0.0)
87+
gh_inspector (>= 1.1.2, < 2.0.0)
88+
google-apis-androidpublisher_v3 (~> 0.3)
89+
google-apis-playcustomapp_v1 (~> 0.1)
90+
google-cloud-env (>= 1.6.0, < 2.0.0)
91+
google-cloud-storage (~> 1.31)
92+
highline (~> 2.0)
93+
http-cookie (~> 1.0.5)
94+
json (< 3.0.0)
95+
jwt (>= 2.1.0, < 3)
96+
mini_magick (>= 4.9.4, < 5.0.0)
97+
multipart-post (>= 2.0.0, < 3.0.0)
98+
naturally (~> 2.2)
99+
optparse (>= 0.1.1, < 1.0.0)
100+
plist (>= 3.1.0, < 4.0.0)
101+
rubyzip (>= 2.0.0, < 3.0.0)
102+
security (= 0.1.5)
103+
simctl (~> 1.6.3)
104+
terminal-notifier (>= 2.0.0, < 3.0.0)
105+
terminal-table (~> 3)
106+
tty-screen (>= 0.6.3, < 1.0.0)
107+
tty-spinner (>= 0.8.0, < 1.0.0)
108+
word_wrap (~> 1.0.0)
109+
xcodeproj (>= 1.13.0, < 2.0.0)
110+
xcpretty (~> 0.3.0)
111+
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
112+
gh_inspector (1.1.3)
113+
google-apis-androidpublisher_v3 (0.54.0)
114+
google-apis-core (>= 0.11.0, < 2.a)
115+
google-apis-core (0.11.3)
116+
addressable (~> 2.5, >= 2.5.1)
117+
googleauth (>= 0.16.2, < 2.a)
118+
httpclient (>= 2.8.1, < 3.a)
119+
mini_mime (~> 1.0)
120+
representable (~> 3.0)
121+
retriable (>= 2.0, < 4.a)
122+
rexml
123+
google-apis-iamcredentials_v1 (0.17.0)
124+
google-apis-core (>= 0.11.0, < 2.a)
125+
google-apis-playcustomapp_v1 (0.13.0)
126+
google-apis-core (>= 0.11.0, < 2.a)
127+
google-apis-storage_v1 (0.31.0)
128+
google-apis-core (>= 0.11.0, < 2.a)
129+
google-cloud-core (1.7.0)
130+
google-cloud-env (>= 1.0, < 3.a)
131+
google-cloud-errors (~> 1.0)
132+
google-cloud-env (1.6.0)
133+
faraday (>= 0.17.3, < 3.0)
134+
google-cloud-errors (1.4.0)
135+
google-cloud-storage (1.47.0)
136+
addressable (~> 2.8)
137+
digest-crc (~> 0.4)
138+
google-apis-iamcredentials_v1 (~> 0.1)
139+
google-apis-storage_v1 (~> 0.31.0)
140+
google-cloud-core (~> 1.6)
141+
googleauth (>= 0.16.2, < 2.a)
142+
mini_mime (~> 1.0)
143+
googleauth (1.8.1)
144+
faraday (>= 0.17.3, < 3.a)
145+
jwt (>= 1.4, < 3.0)
146+
multi_json (~> 1.11)
147+
os (>= 0.9, < 2.0)
148+
signet (>= 0.16, < 2.a)
149+
highline (2.0.3)
150+
http-cookie (1.0.6)
151+
domain_name (~> 0.5)
152+
httpclient (2.8.3)
153+
jmespath (1.6.2)
154+
json (2.7.2)
155+
jwt (2.8.2)
156+
base64
157+
mini_magick (4.13.1)
158+
mini_mime (1.1.5)
159+
multi_json (1.15.0)
160+
multipart-post (2.4.1)
161+
nanaimo (0.3.0)
162+
naturally (2.2.1)
163+
nkf (0.2.0)
164+
optparse (0.5.0)
165+
os (1.1.4)
166+
plist (3.7.1)
167+
public_suffix (6.0.0)
168+
rake (13.2.1)
169+
representable (3.2.0)
170+
declarative (< 0.1.0)
171+
trailblazer-option (>= 0.1.1, < 0.2.0)
172+
uber (< 0.2.0)
173+
retriable (3.1.2)
174+
rexml (3.2.9)
175+
strscan
176+
rouge (2.0.7)
177+
ruby2_keywords (0.0.5)
178+
rubyzip (2.3.2)
179+
security (0.1.5)
180+
signet (0.19.0)
181+
addressable (~> 2.8)
182+
faraday (>= 0.17.5, < 3.a)
183+
jwt (>= 1.5, < 3.0)
184+
multi_json (~> 1.10)
185+
simctl (1.6.10)
186+
CFPropertyList
187+
naturally
188+
strscan (3.1.0)
189+
terminal-notifier (2.0.0)
190+
terminal-table (3.0.2)
191+
unicode-display_width (>= 1.1.1, < 3)
192+
trailblazer-option (0.1.2)
193+
tty-cursor (0.7.1)
194+
tty-screen (0.8.2)
195+
tty-spinner (0.9.3)
196+
tty-cursor (~> 0.7)
197+
uber (0.1.0)
198+
unicode-display_width (2.5.0)
199+
word_wrap (1.0.0)
200+
xcodeproj (1.24.0)
201+
CFPropertyList (>= 2.3.3, < 4.0)
202+
atomos (~> 0.1.3)
203+
claide (>= 1.0.2, < 2.0)
204+
colored2 (~> 3.1)
205+
nanaimo (~> 0.3.0)
206+
rexml (~> 3.2.4)
207+
xcpretty (0.3.0)
208+
rouge (~> 2.0.7)
209+
xcpretty-travis-formatter (1.0.1)
210+
xcpretty (~> 0.2, >= 0.0.7)
211+
212+
PLATFORMS
213+
arm64-darwin-23
214+
ruby
215+
216+
DEPENDENCIES
217+
fastlane
218+
219+
BUNDLED WITH
220+
2.5.5

fastlane/Appfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app
2+
# apple_id("[[APPLE_ID]]") # Your Apple Developer Portal username
3+
4+
5+
# For more information about the Appfile, see:
6+
# https://docs.fastlane.tools/advanced/#appfile

fastlane/Fastfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
default_platform(:ios)
3+
4+
platform :ios do
5+
desc "Run Unit Test"
6+
lane :test_dev do
7+
run_tests(scheme: "BaseSwiftUI Dev",
8+
xcargs: "-skipPackagePluginValidation")
9+
end
10+
end

fastlane/README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
fastlane documentation
2+
----
3+
4+
# Installation
5+
6+
Make sure you have the latest version of the Xcode command line tools installed:
7+
8+
```sh
9+
xcode-select --install
10+
```
11+
12+
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
13+
14+
# Available Actions
15+
16+
## iOS
17+
18+
### ios test_dev
19+
20+
```sh
21+
[bundle exec] fastlane ios test_dev
22+
```
23+
24+
Run Unit Test
25+
26+
----
27+
28+
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
29+
30+
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
31+
32+
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

fastlane/report.xml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<testsuites>
3+
<testsuite name="fastlane.lanes">
4+
5+
6+
7+
8+
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000211">
9+
10+
</testcase>
11+
12+
13+
<testcase classname="fastlane.lanes" name="1: run_tests" time="82.546162">
14+
15+
</testcase>
16+
17+
</testsuite>
18+
</testsuites>

0 commit comments

Comments
 (0)