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

From another author #13

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 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
26 changes: 26 additions & 0 deletions .github/workflows/add-reviewers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Add Requester

on:
push:
branches: [ main ]
Comment on lines +3 to +5
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rerequesting..

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
Comment on lines +12 to +16
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need JDK setup?


- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Add Reviewers
uses: madrapps/add-reviewers@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
reviewers: muralikrish91,thsaravana,saravana-thiyagaraj,instrap
debug-mode: true
3 changes: 2 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ jobs:

- name: Jacoco Report to PR
id: jacoco
uses: madrapps/jacoco-report@v1
uses: madrapps/jacoco-report@v1.1
with:
path: ${{ github.workspace }}/build/reports/jacoco/testCoverage/testCoverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 40
min-coverage-changed-files: 60
debug-mode: false

- name: Get the Coverage info
run: |
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/com/madrapps/jacoco/StringOperation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.madrapps.jacoco;

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

boolean startsWith(String source, String chars);
}
6 changes: 5 additions & 1 deletion src/main/java/com/madrapps/jacoco/operation/StringOp.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
package com.madrapps.jacoco.operation;

public class StringOp {
import com.madrapps.jacoco.StringOperation;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we run this through Detekt?


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);
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/kotlin/com/madrapps/jacoco/Math.kt
Original file line number Diff line number Diff line change
@@ -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
}

Expand Down
12 changes: 12 additions & 0 deletions src/main/kotlin/com/madrapps/jacoco/MathOperation.kt
Original file line number Diff line number Diff line change
@@ -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 {

}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a new line to this?