Skip to content

Commit 3c6837d

Browse files
authored
Merge pull request #11 from k4biri/AUT-1-Setup-CI
AUT-Setup CI
2 parents f816c10 + 1c4cb37 commit 3c6837d

File tree

16 files changed

+382
-81
lines changed

16 files changed

+382
-81
lines changed

.github/workflows/android.yml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,54 @@
11
name: Android CI
22

3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
3+
on: [push]
84

95
jobs:
10-
build:
116

7+
unit-test:
128
runs-on: ubuntu-latest
13-
149
steps:
1510
- uses: actions/checkout@v2
11+
- name: set up Ruby to install fastlane
12+
uses: actions/setup-ruby@v1
13+
with:
14+
ruby-version: '2.7'
1615
- name: set up JDK 1.8
1716
uses: actions/setup-java@v1
1817
with:
1918
java-version: 1.8
20-
- name: Build with Gradle
21-
run: ./gradlew build
19+
- name: setup fastlane
20+
run: bundle install
21+
- name: run unit tests
22+
run: bundle exec fastlane android run_unit_tests
23+
- name: Unit tests results
24+
uses: actions/upload-artifact@v1
25+
with:
26+
name: unit-test-results
27+
path: app/build/reports/tests/testDebugUnitTest/index.html
28+
29+
lint:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v1
33+
- name: set up JDK 1.8
34+
uses: actions/setup-java@v1
35+
with:
36+
java-version: 1.8
37+
- name: Lint
38+
run: bash ./gradlew lint --stacktrace
39+
- name: Lint results
40+
uses: actions/upload-artifact@v1
41+
with:
42+
name: app
43+
path: app/build/reports/lint-results.html
44+
45+
ui-test:
46+
runs-on: macOS-latest
47+
steps:
48+
- name: checkout
49+
uses: actions/checkout@v2
50+
- name: run tests
51+
uses: reactivecircus/android-emulator-runner@v2
52+
with:
53+
api-level: 29
54+
script: ./gradlew connectedCheck

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,16 @@ lint/outputs/
8282
lint/tmp/
8383
# lint/reports/
8484
app/src/main/res/values/api_keys.xml
85+
.idea/compiler.xml
86+
.idea/compiler.xml
87+
.idea/compiler.xml
88+
.idea/jarRepositories.xml
89+
.idea/misc.xml
90+
app/build.gradle
91+
.idea/misc.xml
92+
.idea/misc.xml
93+
.idea/misc.xml
94+
.idea/misc.xml
95+
.idea/misc.xml
96+
.idea/.name
97+
.idea/codeStyles/Project.xml

Gemfile

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

Gemfile.lock

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.3)
5+
addressable (2.7.0)
6+
public_suffix (>= 2.0.2, < 5.0)
7+
artifactory (3.0.15)
8+
atomos (0.1.3)
9+
aws-eventstream (1.1.0)
10+
aws-partitions (1.416.0)
11+
aws-sdk-core (3.111.0)
12+
aws-eventstream (~> 1, >= 1.0.2)
13+
aws-partitions (~> 1, >= 1.239.0)
14+
aws-sigv4 (~> 1.1)
15+
jmespath (~> 1.0)
16+
aws-sdk-kms (1.41.0)
17+
aws-sdk-core (~> 3, >= 3.109.0)
18+
aws-sigv4 (~> 1.1)
19+
aws-sdk-s3 (1.87.0)
20+
aws-sdk-core (~> 3, >= 3.109.0)
21+
aws-sdk-kms (~> 1)
22+
aws-sigv4 (~> 1.1)
23+
aws-sigv4 (1.2.2)
24+
aws-eventstream (~> 1, >= 1.0.2)
25+
babosa (1.0.4)
26+
claide (1.0.3)
27+
colored (1.2)
28+
colored2 (3.1.2)
29+
commander-fastlane (4.4.6)
30+
highline (~> 1.7.2)
31+
declarative (0.0.20)
32+
declarative-option (0.1.0)
33+
digest-crc (0.6.3)
34+
rake (>= 12.0.0, < 14.0.0)
35+
domain_name (0.5.20190701)
36+
unf (>= 0.0.5, < 1.0.0)
37+
dotenv (2.7.6)
38+
emoji_regex (3.2.1)
39+
excon (0.78.1)
40+
faraday (1.3.0)
41+
faraday-net_http (~> 1.0)
42+
multipart-post (>= 1.2, < 3)
43+
ruby2_keywords
44+
faraday-cookie_jar (0.0.7)
45+
faraday (>= 0.8.0)
46+
http-cookie (~> 1.0.0)
47+
faraday-net_http (1.0.1)
48+
faraday_middleware (1.0.0)
49+
faraday (~> 1.0)
50+
fastimage (2.2.1)
51+
fastlane (2.172.0)
52+
CFPropertyList (>= 2.3, < 4.0.0)
53+
addressable (>= 2.3, < 3.0.0)
54+
artifactory (~> 3.0)
55+
aws-sdk-s3 (~> 1.0)
56+
babosa (>= 1.0.3, < 2.0.0)
57+
bundler (>= 1.12.0, < 3.0.0)
58+
colored
59+
commander-fastlane (>= 4.4.6, < 5.0.0)
60+
dotenv (>= 2.1.1, < 3.0.0)
61+
emoji_regex (>= 0.1, < 4.0)
62+
excon (>= 0.71.0, < 1.0.0)
63+
faraday (~> 1.0)
64+
faraday-cookie_jar (~> 0.0.6)
65+
faraday_middleware (~> 1.0)
66+
fastimage (>= 2.1.0, < 3.0.0)
67+
gh_inspector (>= 1.1.2, < 2.0.0)
68+
google-api-client (>= 0.37.0, < 0.39.0)
69+
google-cloud-storage (>= 1.15.0, < 2.0.0)
70+
highline (>= 1.7.2, < 2.0.0)
71+
json (< 3.0.0)
72+
jwt (>= 2.1.0, < 3)
73+
mini_magick (>= 4.9.4, < 5.0.0)
74+
multipart-post (~> 2.0.0)
75+
plist (>= 3.1.0, < 4.0.0)
76+
rubyzip (>= 2.0.0, < 3.0.0)
77+
security (= 0.1.3)
78+
simctl (~> 1.6.3)
79+
slack-notifier (>= 2.0.0, < 3.0.0)
80+
terminal-notifier (>= 2.0.0, < 3.0.0)
81+
terminal-table (>= 1.4.5, < 2.0.0)
82+
tty-screen (>= 0.6.3, < 1.0.0)
83+
tty-spinner (>= 0.8.0, < 1.0.0)
84+
word_wrap (~> 1.0.0)
85+
xcodeproj (>= 1.13.0, < 2.0.0)
86+
xcpretty (~> 0.3.0)
87+
xcpretty-travis-formatter (>= 0.0.3)
88+
gh_inspector (1.1.3)
89+
google-api-client (0.38.0)
90+
addressable (~> 2.5, >= 2.5.1)
91+
googleauth (~> 0.9)
92+
httpclient (>= 2.8.1, < 3.0)
93+
mini_mime (~> 1.0)
94+
representable (~> 3.0)
95+
retriable (>= 2.0, < 4.0)
96+
signet (~> 0.12)
97+
google-cloud-core (1.5.0)
98+
google-cloud-env (~> 1.0)
99+
google-cloud-errors (~> 1.0)
100+
google-cloud-env (1.4.0)
101+
faraday (>= 0.17.3, < 2.0)
102+
google-cloud-errors (1.0.1)
103+
google-cloud-storage (1.29.2)
104+
addressable (~> 2.5)
105+
digest-crc (~> 0.4)
106+
google-api-client (~> 0.33)
107+
google-cloud-core (~> 1.2)
108+
googleauth (~> 0.9)
109+
mini_mime (~> 1.0)
110+
googleauth (0.14.0)
111+
faraday (>= 0.17.3, < 2.0)
112+
jwt (>= 1.4, < 3.0)
113+
memoist (~> 0.16)
114+
multi_json (~> 1.11)
115+
os (>= 0.9, < 2.0)
116+
signet (~> 0.14)
117+
highline (1.7.10)
118+
http-cookie (1.0.3)
119+
domain_name (~> 0.5)
120+
httpclient (2.8.3)
121+
jmespath (1.4.0)
122+
json (2.5.1)
123+
jwt (2.2.2)
124+
memoist (0.16.2)
125+
mini_magick (4.11.0)
126+
mini_mime (1.0.2)
127+
multi_json (1.15.0)
128+
multipart-post (2.0.0)
129+
nanaimo (0.3.0)
130+
naturally (2.2.0)
131+
os (1.1.1)
132+
plist (3.6.0)
133+
public_suffix (4.0.6)
134+
rake (13.0.3)
135+
representable (3.0.4)
136+
declarative (< 0.1.0)
137+
declarative-option (< 0.2.0)
138+
uber (< 0.2.0)
139+
retriable (3.1.2)
140+
rouge (2.0.7)
141+
ruby2_keywords (0.0.2)
142+
rubyzip (2.3.0)
143+
security (0.1.3)
144+
signet (0.14.0)
145+
addressable (~> 2.3)
146+
faraday (>= 0.17.3, < 2.0)
147+
jwt (>= 1.5, < 3.0)
148+
multi_json (~> 1.10)
149+
simctl (1.6.8)
150+
CFPropertyList
151+
naturally
152+
slack-notifier (2.3.2)
153+
terminal-notifier (2.0.0)
154+
terminal-table (1.8.0)
155+
unicode-display_width (~> 1.1, >= 1.1.1)
156+
tty-cursor (0.7.1)
157+
tty-screen (0.8.1)
158+
tty-spinner (0.9.3)
159+
tty-cursor (~> 0.7)
160+
uber (0.1.0)
161+
unf (0.1.4)
162+
unf_ext
163+
unf_ext (0.0.7.7-x64-mingw32)
164+
unicode-display_width (1.7.0)
165+
word_wrap (1.0.0)
166+
xcodeproj (1.19.0)
167+
CFPropertyList (>= 2.3.3, < 4.0)
168+
atomos (~> 0.1.3)
169+
claide (>= 1.0.2, < 2.0)
170+
colored2 (~> 3.1)
171+
nanaimo (~> 0.3.0)
172+
xcpretty (0.3.0)
173+
rouge (~> 2.0.7)
174+
xcpretty-travis-formatter (1.0.1)
175+
xcpretty (~> 0.2, >= 0.0.7)
176+
177+
PLATFORMS
178+
x64-mingw32
179+
180+
DEPENDENCIES
181+
fastlane
182+
183+
BUNDLED WITH
184+
2.1.4

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# arduino-usb-terminal
44
Terminal-like app to send commands to Arduino through USB
55

6-
6+
![Android CI](https://github.com/k4biri/arduino-usb-terminal/workflows/Android%20CI/badge.svg)
7+
78

89
This app simplifies testing your Arduino components that work with direct usb commands by giving you the ability to send custom commands and view the returned message from your Arduino device.
910

app/build.gradle

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
apply plugin: 'com.android.application'
22
apply plugin: 'kotlin-android'
3-
apply plugin: 'kotlin-android-extensions'
43
apply plugin: 'koin'
54

65
repositories {
76
jcenter()
87
}
98

109
android {
11-
compileSdkVersion 29
12-
buildToolsVersion "29.0.3"
10+
compileSdkVersion 30
1311

1412
compileOptions {
1513
sourceCompatibility JavaVersion.VERSION_1_8
@@ -19,7 +17,7 @@ android {
1917
defaultConfig {
2018
applicationId "org.kabiri.android.usbterminal"
2119
minSdkVersion 23
22-
targetSdkVersion 29
20+
targetSdkVersion 30
2321
versionCode 7
2422
versionName "0.7.0"
2523

@@ -33,15 +31,19 @@ android {
3331
}
3432
}
3533

34+
buildFeatures {
35+
viewBinding true
36+
}
37+
3638
}
3739

3840
dependencies {
3941

4042
implementation fileTree(dir: 'libs', include: ['*.jar'])
41-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
42-
implementation 'androidx.appcompat:appcompat:1.1.0'
43-
implementation 'androidx.core:core-ktx:1.2.0'
44-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
43+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
44+
implementation 'androidx.appcompat:appcompat:1.2.0'
45+
implementation 'androidx.core:core-ktx:1.3.2'
46+
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
4547

4648
// Sentry Tracking
4749
implementation 'io.sentry:sentry-android-core:2.0.2'
@@ -52,13 +54,22 @@ dependencies {
5254
// Coroutines
5355
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
5456
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
55-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0'
56-
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0'
57+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
58+
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
5759
// testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.3.0-RC2'
5860

59-
testImplementation 'junit:junit:4.12'
60-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
61-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
61+
// unit test libs
62+
testImplementation 'junit:junit:4.13.1'
63+
testImplementation "com.google.truth:truth:1.1.2"
64+
65+
// instrumented test libs
66+
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
67+
// Espresso
68+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
69+
// Hamcrest for view matching
70+
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'
71+
androidTestImplementation 'androidx.test:runner:1.3.0'
72+
androidTestImplementation 'androidx.test:rules:1.3.0'
6273

6374
/**
6475
* This library helps to automate some parts of the USB serial connection.

app/src/androidTest/java/org/kabiri/android/usbterminal/ExampleInstrumentedTest.kt

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)