Skip to content

Commit

Permalink
Merge pull request #516 from nimblehq/release/3.23.0
Browse files Browse the repository at this point in the history
[Release] 3.23.0
  • Loading branch information
ryan-conway authored Aug 31, 2023
2 parents 6683929 + 0abf70d commit 832b35e
Show file tree
Hide file tree
Showing 35 changed files with 254 additions and 361 deletions.
4 changes: 2 additions & 2 deletions .cicdtemplate/.bitrise/bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ workflows:
# Execute UnitTest
- android-unit-test@1:
inputs:
- arguments: koverMergedHtmlReport
- arguments: koverHtmlReport
- variant: "$VARIANT"
- module: "$MODULE"
- report_path_pattern: '*build/reports'
Expand All @@ -61,7 +61,7 @@ workflows:
# Upload Kover report to Apps & Artifacts for later downloading
- deploy-to-bitrise-io@1:
inputs:
- deploy_path: "$PROJECT_LOCATION/build/reports/kover/merged/html/index.html"
- deploy_path: "$PROJECT_LOCATION/app/build/reports/kover/html/index.html"
- is_enable_public_page: 'false'
- is_compress: 'true'
- notify_user_groups: none
Expand Down
14 changes: 2 additions & 12 deletions .cicdtemplate/.codemagic/codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,14 @@ definitions:
cache_paths:
- $HOME/.gradle/caches
scripts:
- &set_up_google_services_files_from_environment_variables
name: Set up google-services.json files
script: |
mkdir -p app/src/production
echo $GOOGLE_SERVICES_JSON > app/src/production/google-services.json
mkdir -p app/src/staging
echo $GOOGLE_SERVICES_JSON_STAGING > app/src/staging/google-services.json
- &detekt
name: Run detekt
script: ./gradlew detekt
- &unit_test
name: Run unit tests
script: ./gradlew koverMergedReport
script: ./gradlew koverHtmlReport
artifacts:
- &artifacts_test_report build/reports/kover/merged/
- &artifacts_test_report app/build/reports/kover/
- &artifacts_staging_apk app/build/outputs/apk/staging/debug/app-staging-debug.apk
- &artifacts_production_apk app/build/outputs/apk/production/debug/app-production-debug.apk
workflows:
Expand All @@ -47,7 +40,6 @@ workflows:
include: false
cancel_previous_builds: true
scripts:
- *set_up_google_services_files_from_environment_variables
- *detekt
- *unit_test
artifacts:
Expand All @@ -62,7 +54,6 @@ workflows:
branch_patterns:
- pattern: develop
scripts:
- *set_up_google_services_files_from_environment_variables
- *detekt
- *unit_test
- name: Build APK for staging
Expand All @@ -89,7 +80,6 @@ workflows:
branch_patterns:
- pattern: main
scripts:
- *set_up_google_services_files_from_environment_variables
- *detekt
- *unit_test
- name: Build APK for production
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up google-services.json files
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
GOOGLE_SERVICES_JSON_STAGING: ${{ secrets.GOOGLE_SERVICES_JSON_STAGING }}
run: |
mkdir -p app/src/production
echo $GOOGLE_SERVICES_JSON > app/src/production/google-services.json
mkdir -p app/src/staging
echo $GOOGLE_SERVICES_JSON_STAGING > app/src/staging/google-services.json
- name: Run Detekt
run: ./gradlew detekt

Expand All @@ -58,13 +48,13 @@ jobs:
path: build/reports/detekt/

- name: Run unit tests with Kover
run: ./gradlew koverMergedHtmlReport
run: ./gradlew koverHtmlReport

- name: Archive code coverage reports
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReports
path: build/reports/kover/merged/
path: app/build/reports/kover/

- name: Build staging APK
run: ./gradlew assembleStagingDebug
Expand Down
12 changes: 1 addition & 11 deletions .cicdtemplate/.github/workflows/review_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,14 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up google-services.json
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
GOOGLE_SERVICES_JSON_STAGING: ${{ secrets.GOOGLE_SERVICES_JSON_STAGING }}
run: |
mkdir -p app/src/production
echo $GOOGLE_SERVICES_JSON > app/src/production/google-services.json
mkdir -p app/src/staging
echo $GOOGLE_SERVICES_JSON_STAGING > app/src/staging/google-services.json
- name: Run Detekt
run: ./gradlew detekt

- name: Run Android Lint
run: ./gradlew lint

- name: Run unit tests with Kover
run: ./gradlew koverMergedXmlReport
run: ./gradlew koverXmlReport

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
11 changes: 2 additions & 9 deletions .cicdtemplate/.github/workflows/run_detekt_and_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up google-services.json
env:
GOOGLE_SERVICES_JSON_STAGING: ${{ secrets.GOOGLE_SERVICES_JSON_STAGING }}
run: |
mkdir -p app/src/staging
echo $GOOGLE_SERVICES_JSON_STAGING > app/src/staging/google-services.json
- name: Run Detekt
run: ./gradlew detekt

Expand All @@ -58,11 +51,11 @@ jobs:
path: build/reports/detekt/

- name: Run unit tests with Kover
run: ./gradlew koverMergedHtmlReport
run: ./gradlew koverHtmlReport

- name: Archive code coverage reports
uses: actions/upload-artifact@v2
if: always()
with:
name: CodeCoverageReports
path: build/reports/kover/merged/
path: app/build/reports/kover/
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Team
# @ryan-conway is the Team Lead and the others are team members
* @AVI5HEK @chornerman @doannimble @hoangnguyen92dn @kaungkhantsoe @luongvo @lydiasama @manh-t @minhnimble @ryan-conway @sleepylee @thiennguyen0196 @Tuubz @Wadeewee
* @AVI5HEK @chornerman @doannimble @hoangnguyen92dn @kaungkhantsoe @luongvo @lydiasama @manh-t @minhnimble @ryan-conway @sleepylee @thiennguyen0196 @toby-thanathip @Wadeewee

# Engineering Leads
CODEOWNERS @nimblehq/engineering-leads
14 changes: 2 additions & 12 deletions .github/workflows/review_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,10 @@ jobs:

- name: Run unit tests with Kover on template-xml
working-directory: ./template-xml
run: ./gradlew koverMergedXmlReport
run: ./gradlew koverXmlReport

# template-compose

- name: Set up google-services.json on template-compose
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
GOOGLE_SERVICES_JSON_STAGING: ${{ secrets.GOOGLE_SERVICES_JSON_STAGING }}
run: |
mkdir -p template-compose/app/src/production
echo $GOOGLE_SERVICES_JSON > template-compose/app/src/production/google-services.json
mkdir -p template-compose/app/src/staging
echo $GOOGLE_SERVICES_JSON_STAGING > template-compose/app/src/staging/google-services.json
- name: Run Detekt on template-compose
working-directory: ./template-compose
run: ./gradlew detekt
Expand All @@ -67,7 +57,7 @@ jobs:

- name: Run unit tests with Kover on template-compose
working-directory: ./template-compose
run: ./gradlew koverMergedXmlReport
run: ./gradlew koverXmlReport

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand Down
24 changes: 8 additions & 16 deletions .github/workflows/run_detekt_and_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jobs:
name: Run Detekt and unit tests
runs-on: ubuntu-latest
timeout-minutes: 30
environment: template-compose
steps:
- name: Set up JDK 11
uses: actions/setup-java@v2
Expand Down Expand Up @@ -43,23 +42,16 @@ jobs:

- name: Run unit tests with Kover on template-xml
working-directory: ./template-xml
run: ./gradlew koverMergedHtmlReport
run: ./gradlew koverHtmlReport

- name: Archive code coverage reports on template-xml
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateXML
path: template-xml/build/reports/kover/merged/
path: template-xml/app/build/reports/kover/

# template-compose

- name: Set up google-services.json on template-compose
env:
GOOGLE_SERVICES_JSON_STAGING: ${{ secrets.GOOGLE_SERVICES_JSON_STAGING }}
run: |
mkdir -p template-compose/app/src/staging
echo $GOOGLE_SERVICES_JSON_STAGING > template-compose/app/src/staging/google-services.json
- name: Run Detekt on template-compose
working-directory: ./template-compose
run: ./gradlew detekt
Expand All @@ -72,13 +64,13 @@ jobs:

- name: Run unit tests with Kover on template-compose
working-directory: ./template-compose
run: ./gradlew koverMergedHtmlReport
run: ./gradlew koverHtmlReport

- name: Archive code coverage reports on template-compose
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateCompose
path: template-compose/build/reports/kover/merged/
path: template-compose/app/build/reports/kover/

# sample-xml

Expand All @@ -94,13 +86,13 @@ jobs:

- name: Run unit tests with Kover on sample-xml
working-directory: ./sample-xml
run: ./gradlew koverMergedHtmlReport
run: ./gradlew koverHtmlReport

- name: Archive code coverage reports on sample-xml
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateXML
path: sample-xml/build/reports/kover/merged/
path: sample-xml/app/build/reports/kover/

# sample-compose

Expand All @@ -116,10 +108,10 @@ jobs:

- name: Run unit tests with Kover on sample-compose
working-directory: ./sample-compose
run: ./gradlew koverMergedHtmlReport
run: ./gradlew koverHtmlReport

- name: Archive code coverage reports on sample-compose
uses: actions/upload-artifact@v2
with:
name: CodeCoverageReportsTemplateCompose
path: sample-compose/build/reports/kover/merged/
path: sample-compose/app/build/reports/kover/
6 changes: 3 additions & 3 deletions Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ end

# Show Danger test coverage report from Kover for templates
# Report coverage of modified files, warn if total project coverage is under 80%
# or if any modified file's coverage is under 90%
kover_file_template_xml = "template-xml/build/reports/kover/merged/xml/report.xml"
# or if any modified file's coverage is under 95%
kover_file_template_xml = "template-xml/app/build/reports/kover/report.xml"
markdown "## Kover report for template-xml:"
shroud.reportKover "Template - XML Unit Tests", kover_file_template_xml, 80, 95, false

kover_file_template_compose = "template-compose/build/reports/kover/merged/xml/report.xml"
kover_file_template_compose = "template-compose/app/build/reports/kover/report.xml"
markdown "## Kover report for template-compose:"
shroud.reportKover "Template - Compose Unit Tests", kover_file_template_compose, 80, 95, false
18 changes: 4 additions & 14 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ definitions:
cache_paths:
- $HOME/.gradle/caches
scripts:
- &set_up_google_services_files_from_environment_variables
name: Set up google-services.json on template-compose
script: |
mkdir -p template-compose/app/src/production
echo $GOOGLE_SERVICES_JSON > template-compose/app/src/production/google-services.json
mkdir -p template-compose/app/src/staging
echo $GOOGLE_SERVICES_JSON_STAGING > template-compose/app/src/staging/google-services.json
- &detekt_on_template_compose
name: Run detekt on template-compose
working_directory: ./template-compose
Expand All @@ -28,14 +21,14 @@ definitions:
- &unit_test_on_template_compose
name: Run unit tests on template-compose
working_directory: ./template-compose
script: ./gradlew koverMergedReport
script: ./gradlew koverHtmlReport
- &unit_test_on_template_xml
name: Run unit tests on template-xml
working_directory: ./template-xml
script: ./gradlew koverMergedReport
script: ./gradlew koverHtmlReport
artifacts:
- &artifacts_template_compose template-compose/build/reports/kover/merged/
- &artifacts_template_xml template-xml/build/reports/kover/merged/
- &artifacts_template_compose template-compose/app/build/reports/kover/
- &artifacts_template_xml template-xml/app/build/reports/kover/
- &artifacts_staging_apk template-compose/app/build/outputs/apk/staging/debug/app-staging-debug.apk
- &artifacts_production_apk template-compose/app/build/outputs/apk/production/debug/app-production-debug.apk
workflows:
Expand All @@ -58,7 +51,6 @@ workflows:
include: false
cancel_previous_builds: true
scripts:
- *set_up_google_services_files_from_environment_variables
- *detekt_on_template_compose
- *unit_test_on_template_compose
artifacts:
Expand Down Expand Up @@ -97,7 +89,6 @@ workflows:
branch_patterns:
- pattern: develop
scripts:
- *set_up_google_services_files_from_environment_variables
- *detekt_on_template_compose
- *unit_test_on_template_compose
- name: Build APK for staging
Expand Down Expand Up @@ -125,7 +116,6 @@ workflows:
branch_patterns:
- pattern: main
scripts:
- *set_up_google_services_files_from_environment_variables
- *detekt_on_template_compose
- *unit_test_on_template_compose
- name: Build APK for production
Expand Down
4 changes: 2 additions & 2 deletions sample-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ $ ./gradlew domain:test
- Run unit testing with coverage:

```
$ ./gradlew koverMergedHtmlReport
$ ./gradlew koverHtmlReport
```

Report is located at: `./build/reports/kover/merged/`
Report is located at: `app/build/reports/kover/`

## Build and deploy

Expand Down
Loading

0 comments on commit 832b35e

Please sign in to comment.