Skip to content

Commit d28cc62

Browse files
committed
fix conflicts
2 parents a535303 + fbd9acd commit d28cc62

52 files changed

Lines changed: 2414 additions & 167 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,22 @@ on:
66
- '*'
77
# tags:
88
# - '!v*'
9+
pull_request:
10+
branches:
11+
- '*'
12+
types: [opened, synchronize, reopened]
913

1014
jobs:
1115
build:
1216
runs-on: ubuntu-latest
1317

1418
steps:
15-
- uses: actions/checkout@v2
16-
17-
- name: Setup JDK 11
18-
uses: actions/setup-java@v2
19+
- uses: actions/checkout@v5
20+
- name: Setup JDK 17
21+
uses: actions/setup-java@v5
1922
with:
20-
distribution: 'temurin'
21-
java-version: '11'
23+
distribution: 'zulu'
24+
java-version: '17'
2225
cache: 'gradle'
2326

2427
- name: Environment info
@@ -37,6 +40,9 @@ jobs:
3740
run: |
3841
gradle --version
3942
43+
- name: Run gradle tests
44+
run: ./gradlew testDemoProdDebugUnitTest --stacktrace
45+
4046
- uses: actions/upload-artifact@v4
4147
with:
4248
name: openimis-claims-apk-${{github.run_number}}-${{github.sha}}

.github/workflows/manual.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description: Display name of the application
1212
required: false
1313
default: Claims Manual
14+
app_version:
15+
description: Version of the application
16+
required: true
17+
default: v1.0.0
1418
app_dir:
1519
description: Name of the folder in Documents, default IMIS-CLI
1620
required: false
@@ -30,13 +34,13 @@ jobs:
3034
runs-on: ubuntu-latest
3135

3236
steps:
33-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3438

35-
- name: Setup JDK 11
36-
uses: actions/setup-java@v2
39+
- name: Setup JDK 17
40+
uses: actions/setup-java@v5
3741
with:
38-
distribution: 'temurin'
39-
java-version: '11'
42+
distribution: 'zulu'
43+
java-version: '17'
4044
cache: 'gradle'
4145

4246
- name: Environment info
@@ -64,11 +68,27 @@ jobs:
6468
run: |
6569
gradle --version
6670
71+
# Run Tests Build
72+
- name: Run gradle tests
73+
run: ./gradlew testCliDebugUnitTest --stacktrace
74+
6775
- uses: actions/upload-artifact@v4
6876
with:
6977
name: openimis-claims-apk-${{github.run_number}}-${{github.sha}}
7078
path: ./claimManagement/build/outputs/**/*.apk
7179

80+
#publish in release
81+
- name: Edit release ${{ github.event.inputs.app_version }}
82+
uses: softprops/action-gh-release@v1
83+
with:
84+
tag_name: ${{ github.event.inputs.app_version }} # Sets the release tag to the pushed tag name (e.g., v1.0.0)
85+
name: ${{ github.event.inputs.app_version }} # Sets the release name to the pushed tag name (e.g., Release v1.0.0)
86+
files: ./app/build/outputs/**/*.apk
87+
draft: false
88+
prerelease: false
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
91+
7292
# - name: build
7393
# run: |
7494
# ./gradlew bundleDebug --stacktrace

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ proguard/
2626
# Log Files
2727
*.log
2828

29+
# Java heap dump files
30+
*.hprof
31+
2932
# Android Studio Navigation editor temp files
3033
.navigation/
3134

@@ -76,9 +79,13 @@ fastlane/readme.md
7679

7780
# Visual Studio Code
7881
.vscode/
82+
./.DS_Store
83+
./.git/.DS_Store
84+
*.DS_Store
7985

8086

8187
# Custom product flavours
8288
*custom-flavours.gradle
83-
8489
.DS_Store
90+
*.properties
91+
./gradle

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ private String _Domain = "http://132.148.151.32/";
3939
```
4040

4141
For demo purposes, the default Web Services domain is set to the openIMIS
42-
demo server: demo.openimis.org (IP: 132.148.151.32).
42+
demo server: demo.openimis.org (IP: 132.148.151.32).
43+
44+
If you want to receive error and exception events in sentry
45+
you can set `sentry_dsn` in build.gradle file
4346

4447
### Running the app
4548

claimManagement/build.gradle

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ android {
2727
minSdkVersion 26
2828
targetSdkVersion 32
2929
versionCode 4
30-
versionName "2.0.5"
30+
versionName "2.0.6"
3131
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
3232
}
3333
buildTypes {
@@ -62,6 +62,7 @@ android {
6262
buildConfigField "String", "RAR_PASSWORD", '")(#$1HsD"'
6363
buildConfigField "String", "API_VERSION", '"3"'
6464
resValue "string", "release_tag", "release/25.04"
65+
resValue "string", "sentry_dsn", ""
6566
}
6667

6768
productFlavors {
@@ -180,6 +181,13 @@ android {
180181
packagingOptions {
181182
exclude 'META-INF/DEPENDENCIES'
182183
}
184+
185+
testOptions {
186+
unitTests {
187+
includeAndroidResources = true
188+
returnDefaultValues = true
189+
}
190+
}
183191
}
184192

185193
apollo {
@@ -193,6 +201,13 @@ apollo {
193201
]
194202
}
195203

204+
tasks.withType(Test).configureEach {
205+
testLogging {
206+
events "passed", "skipped", "failed"
207+
exceptionFormat "full"
208+
showStandardStreams = false
209+
}
210+
}
196211

197212
// Apply custom flavours
198213
if(file('custom-flavours.gradle').exists()){
@@ -215,10 +230,15 @@ dependencies {
215230
implementation ('com.apollographql.apollo:apollo-android-support:2.5.14'){
216231
because("Apollo 3+ only works with Kotlin coroutines")
217232
}
218-
testImplementation 'junit:junit:4.12'
233+
testImplementation 'junit:junit:4.13.2'
234+
testImplementation 'org.mockito:mockito-core:5.5.0'
235+
testImplementation 'org.robolectric:robolectric:4.11.1'
236+
testImplementation 'androidx.test:core:1.5.0'
219237
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
220238
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
239+
androidTestImplementation 'androidx.test:core:1.5.0'
221240
implementation group: 'com.squareup.picasso', name: 'picasso', version: '2.71828'
222241
implementation group: 'net.lingala.zip4j', name: 'zip4j', version: '1.2.7'
242+
implementation 'io.sentry:sentry-android:8.25.0'
223243

224244
}
Binary file not shown.

claimManagement/src/.DS_Store

-8 KB
Binary file not shown.

claimManagement/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@
5757
android:resource="@xml/paths" />
5858
</provider>
5959

60+
<meta-data
61+
android:name="io.sentry.dsn"
62+
android:value="@string/sentry_dsn" />
63+
6064
<activity
6165
android:name=".MainActivity"
6266
android:exported="true"

claimManagement/src/main/graphql/org.openimis.imisclaim/GetHF.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
query GetHealthFacility ($offset: Int){
1+
query GetHealthFacilities ($offset: Int){
22
healthFacilities(offset: $offset) {
33
pageInfo {
44
hasNextPage

0 commit comments

Comments
 (0)