Skip to content

Commit

Permalink
feat: Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogarfe committed Jun 21, 2024
1 parent e861075 commit cb7ee37
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -18,31 +21,35 @@ 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
```

## 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
Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.geekshubs.javawebapp</groupId>
<artifactId>java-maven-calculator-web-app</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit cb7ee37

Please sign in to comment.