From f5e663fc83ea7110954a02d74a8add3d015554a2 Mon Sep 17 00:00:00 2001 From: JacksonvBarbosa Date: Thu, 19 Sep 2024 16:30:26 -0300 Subject: [PATCH 1/6] =?UTF-8?q?Adicionado=20coment=C3=A9rio=20para=20AB#3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 541f35a..b8658a4 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,4 @@ http://localhost:8080/swagger-ui/index.html ![](/assets/images/swagger.png) +Editando para mostrar no Azure DevOps From 3bc92550a549a2250b611dad76de310c9c0ccae7 Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 26 Sep 2024 16:40:00 -0300 Subject: [PATCH 2/6] Asicionando CI --- .github/workflows/continuous_integration.yaml | 20 +++++++++++++++++++ compose.yaml | 2 +- .../controller/ProdutoControllerTest.java | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/continuous_integration.yaml diff --git a/.github/workflows/continuous_integration.yaml b/.github/workflows/continuous_integration.yaml new file mode 100644 index 0000000..30180b4 --- /dev/null +++ b/.github/workflows/continuous_integration.yaml @@ -0,0 +1,20 @@ +name: Continuous Integration FIAP +on: + pull_request: + branches: + - develop +jobs: + build: + runs-on: ubuntu-latest + steps: + - + name: Git Checkout + uses: actions/checkout@v4 + + - name: Setup Java SDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '21' + - name: Unit tests + run: mvn test \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index b7dc1b5..4019f41 100644 --- a/compose.yaml +++ b/compose.yaml @@ -13,6 +13,6 @@ services: - "8080:8080" environment: - PROFILE=dev - - DATABASE_URL=jdbc:mysql://db:3306/api?createDatabaseIfNotExist=true + - DATABASE_URL=jdbc:mysql://bd-fiap-api-dev11.mysql.database.azure.com:3306/api?createDatabaseIfNotExist=true - DATABASE_USER=root - DATABASE_PWD=root_pass diff --git a/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java b/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java index 9670a52..4cf345d 100644 --- a/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java +++ b/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java @@ -57,7 +57,7 @@ void testGivenNewProduto_whenCreate_thenSavedProduto() throws Exception{ @DisplayName("test fail") @Test void testGivenNewProduto_whenCreate_thenFail() throws Exception{ - // fail("Um erro acontecerá"); + //fail("Um erro acontecerá"); } } From f0e2ae49382993a89317cb6d82463222c2a22295 Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 26 Sep 2024 16:43:42 -0300 Subject: [PATCH 3/6] Update docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b8658a4..a198b41 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Aplicação API docker compose up --build ``` -## Testes unitários (validação) +## Testes unitários (validação 1) ./mvnw test From 22dbd0300ca313b160e3b1e3cb2e6a627d1eeb0a Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 26 Sep 2024 16:53:36 -0300 Subject: [PATCH 4/6] =?UTF-8?q?C=C3=B3digo=20com=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fiap/simple_api_java/controller/ProdutoControllerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java b/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java index 4cf345d..4948def 100644 --- a/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java +++ b/src/test/java/com/github/fiap/simple_api_java/controller/ProdutoControllerTest.java @@ -57,7 +57,7 @@ void testGivenNewProduto_whenCreate_thenSavedProduto() throws Exception{ @DisplayName("test fail") @Test void testGivenNewProduto_whenCreate_thenFail() throws Exception{ - //fail("Um erro acontecerá"); + fail("Um erro acontecerá"); } } From 824afb02e6aea8c14af62e498a3964b907a7d0f2 Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 26 Sep 2024 16:58:13 -0300 Subject: [PATCH 5/6] =?UTF-8?q?Retirado=20numero=201=20da=20valida=C3=A7?= =?UTF-8?q?=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a198b41..49248a5 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Aplicação API docker compose up --build ``` -## Testes unitários (validação 1) +## Testes unitários (validação ) ./mvnw test From 1350376af39c1d9d1ad9660c5afe0658a714cd90 Mon Sep 17 00:00:00 2001 From: Jackson Date: Thu, 26 Sep 2024 17:29:09 -0300 Subject: [PATCH 6/6] Docs atualizado --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 49248a5..1d2b425 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Aplicação API docker compose up --build ``` -## Testes unitários (validação ) +## Testes unitários (validação 14) ./mvnw test