From cb7ee37e60aceb65db8ada08944f376a85b28ae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Garc=C3=ADa=20Fern=C3=A1ndez?= Date: Wed, 19 Jan 2022 16:18:07 +0100 Subject: [PATCH] feat: Reformat code --- .github/workflows/test-report.yml | 2 +- README.md | 11 +++++++++-- pom.xml | 5 +++-- .../calculator/service/CalculatorService.java | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index 5abf5eb..c1d5a19 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -3,7 +3,7 @@ on: workflow_call: workflow_dispatch: workflow_run: - workflows: ['CI'] # runs after CI workflow + workflows: [ 'CI' ] # runs after CI workflow types: - completed jobs: diff --git a/README.md b/README.md index 463c1d1..a1164f4 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,18 @@ # A Java Maven Calculator Web App + A Java calculator web app, build by Maven, CI/CD # Requirements Create calculator App + * Sum: sum two numbers and return result * Subtract: subtract two numbers and return result * Multiply: multiply two numbers and return result * Divide: divide two numbers and return result Create a service to wrap those methods + * Sum: sum two numbers and return result * Subtract: subtract two numbers and return result * Multiply: multiply two numbers and return result @@ -18,24 +21,27 @@ Create a service to wrap those methods ## System requirements -JDK-11 -Maven 3.8.4 +* JDK-11 +* Maven 3.8.4 ## 1. Manually Build, Test, and Deploy By Maven ### 1.2 Run JUnit Test Maven execution: + ```console $ mvn clean test ``` Maven wrapper: + ```console $ mvn wrapper:wrapper -Dmaven=3.8.4 ``` Execute (linux/macos mvnw or windows mvnw.cmd): + ```console $ ./mvnw clean test ``` @@ -43,6 +49,7 @@ $ ./mvnw clean test ## 2. Automatically Build and Test [Github action ci](.github/workflows/ci.yml) step definition: + ```yaml steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/pom.xml b/pom.xml index 940c7c3..80cb782 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 com.geekshubs.javawebapp java-maven-calculator-web-app diff --git a/src/main/java/com/geekshubs/calculator/service/CalculatorService.java b/src/main/java/com/geekshubs/calculator/service/CalculatorService.java index 8607cfb..4587422 100644 --- a/src/main/java/com/geekshubs/calculator/service/CalculatorService.java +++ b/src/main/java/com/geekshubs/calculator/service/CalculatorService.java @@ -19,4 +19,4 @@ public Calculator Mul(int x, int y) { public Calculator Div(int x, int y) { return new Calculator(x, y, x / y); } -} \ No newline at end of file +}