diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml new file mode 100644 index 0000000..7401073 --- /dev/null +++ b/.github/workflows/add-reviewers.yml @@ -0,0 +1,26 @@ +name: Add Requester + +on: + push: + branches: [ main ] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Add Reviewers + uses: madrapps/add-reviewers@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + reviewers: saravana-thiyagaraj,instrap,muralikrish91,thsaravana + debug-mode: true diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a24a65a..8ee67f2 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,7 +2,6 @@ name: Measure coverage on: push: - branches: [ main ] pull_request: jobs: @@ -29,13 +28,13 @@ jobs: - name: Jacoco Report to PR id: jacoco - uses: madrapps/jacoco-report@v1.1 + uses: madrapps/jacoco-report@v1.3_baseSHA with: - path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml + paths: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml token: ${{ secrets.GITHUB_TOKEN }} min-coverage-overall: 40 min-coverage-changed-files: 60 - debug-mode: false + debug-mode: true - name: Get the Coverage info run: | diff --git a/src/main/java/com/madrapps/jacoco/StringOperation.java b/src/main/java/com/madrapps/jacoco/StringOperation.java new file mode 100644 index 0000000..df85f61 --- /dev/null +++ b/src/main/java/com/madrapps/jacoco/StringOperation.java @@ -0,0 +1,7 @@ +package com.madrapps.jacoco; + +public interface StringOperation { + boolean endsWith(String source, String chars); + + boolean startsWith(String source, String chars); +} diff --git a/src/main/java/com/madrapps/jacoco/operation/StringOp.java b/src/main/java/com/madrapps/jacoco/operation/StringOp.java index be10d58..86d0730 100644 --- a/src/main/java/com/madrapps/jacoco/operation/StringOp.java +++ b/src/main/java/com/madrapps/jacoco/operation/StringOp.java @@ -1,11 +1,15 @@ package com.madrapps.jacoco.operation; -public class StringOp { +import com.madrapps.jacoco.StringOperation; +public class StringOp implements StringOperation { + + @Override public boolean endsWith(String source, String chars) { return source.endsWith(chars); } + @Override public boolean startsWith(String source, String chars) { return source.startsWith(chars); } diff --git a/src/main/kotlin/com/madrapps/jacoco/Math.kt b/src/main/kotlin/com/madrapps/jacoco/Math.kt index 9352ca2..e798382 100644 --- a/src/main/kotlin/com/madrapps/jacoco/Math.kt +++ b/src/main/kotlin/com/madrapps/jacoco/Math.kt @@ -1,20 +1,20 @@ package com.madrapps.jacoco -class Arithmetic { +class Arithmetic : MathOperation { - fun add(a: Int, b: Int): Int { + override fun add(a: Int, b: Int): Int { return a + b } - fun subtract(a: Int, b: Int): Int { + override fun subtract(a: Int, b: Int): Int { return a - b } - fun multiply(a: Int, b: Int): Int { + override fun multiply(a: Int, b: Int): Int { return a * b } - fun divide(a: Int, b: Int): Int { + override fun divide(a: Int, b: Int): Int { return a / b } diff --git a/src/main/kotlin/com/madrapps/jacoco/MathOperation.kt b/src/main/kotlin/com/madrapps/jacoco/MathOperation.kt new file mode 100644 index 0000000..dc28882 --- /dev/null +++ b/src/main/kotlin/com/madrapps/jacoco/MathOperation.kt @@ -0,0 +1,12 @@ +package com.madrapps.jacoco + +interface MathOperation { + fun add(a: Int, b: Int): Int + fun subtract(a: Int, b: Int): Int + fun multiply(a: Int, b: Int): Int + fun divide(a: Int, b: Int): Int + + interface MathOp { + + } +} \ No newline at end of file