Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Testing main flow" #14

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,17 @@ jobs:

- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@workflow_summary
uses: madrapps/jacoco-report@v1.2
with:
paths: |
${{ github.workspace }}/**/build/reports/jacoco/**/**.xml,
${{ github.workspace }}/**/build/reports/jacoco/**/**.xml
${{ github.workspace }}/app/build/reports/jacoco/prodNormalDebugCoverage/prodNormalDebugCoverage.xml,
${{ github.workspace }}/math/build/reports/jacoco/debugCoverage/debugCoverage.xml,
${{ github.workspace }}/text/build/reports/jacoco/debugCoverage/debugCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 45
min-coverage-changed-files: 84
title: '# :lobster: `Coverage Report`'
update-comment: true
comment-type: 'both'
pass-emoji: ':green_circle:'
fail-emoji: ':red_circle:'
continue-on-error: true
debug-mode: true
min-coverage-overall: 40
min-coverage-changed-files: 60
title: Code Coverage
debug-mode: false

- name: Get the Coverage info
run: |
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/madrapps/playground/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class MainActivity : AppCompatActivity() {
val userId = "admin"
val model: MainViewModel by viewModels()
Log.d("App", "Validate = ${model.validate(userId)}")
Log.d("App", "Verify Access = ${model.verifyAccess1(userId)}")
Log.d("App", "Verify Access = ${model.verifyAccess(userId)}")

// Math module
val arithmetic = Arithmetic()
Expand Down
6 changes: 1 addition & 5 deletions app/src/main/java/com/madrapps/playground/MainViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ class MainViewModel : ViewModel() {
return userId == "admin"
}

fun verifyAccess1(userId: String): Boolean {
fun verifyAccess(userId: String): Boolean {
return userId == "super-admin"
}

fun verifyPassword(password: String): Boolean {
return password.isNotBlank()
}
}

This file was deleted.

4 changes: 0 additions & 4 deletions math/src/main/java/com/madrapps/math/Math.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ class Arithmetic : MathOperation {
return a / b
}

override fun difference(a: Int, b: Int): Int {
return subtract(a, b)
}

fun modulo(a: Int, b: Int): Int {
return a % b
}
Expand Down
1 change: 0 additions & 1 deletion math/src/main/java/com/madrapps/math/MathOperation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ interface MathOperation {
fun subtract(a: Int, b: Int): Int
fun multiply(a: Int, b: Int): Int
fun divide(a: Int, b: Int): Int
fun difference(a: Int, b: Int): Int

interface MathOp {

Expand Down
10 changes: 0 additions & 10 deletions math/src/main/java/com/madrapps/math/Statistics.kt

This file was deleted.

7 changes: 1 addition & 6 deletions text/src/main/java/com/madrapps/text/StringOp.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* String related operation
*/
public class StringOp implements IStringOperation {
public class StringOp implements StringOperation {

@Override
public boolean endsWith(String source, String chars) {
Expand All @@ -14,9 +14,4 @@ public boolean endsWith(String source, String chars) {
public boolean startsWith(String source, String chars) {
return source.startsWith(chars);
}

@Override
public boolean replace(String from, String to) {
return false;
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.madrapps.text;

public interface IStringOperation {
public interface StringOperation {
boolean endsWith(String source, String chars);

boolean startsWith(String source, String chars);

boolean replace(String from, String to);
}
Loading