From 2bfd58ae5358b51706fb717715b58b378068f0b4 Mon Sep 17 00:00:00 2001 From: PedroSvicero Date: Wed, 17 Sep 2025 17:51:52 -0300 Subject: [PATCH 1/6] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 541f35a..ed07e33 100644 --- a/README.md +++ b/README.md @@ -25,3 +25,4 @@ http://localhost:8080/swagger-ui/index.html ![](/assets/images/swagger.png) +minha primeira alteração no readme From 702a79f3e6a8b6dcf04239ca46c9d72111f57fb3 Mon Sep 17 00:00:00 2001 From: PedroSvicero Date: Fri, 19 Sep 2025 15:41:45 -0300 Subject: [PATCH 2/6] Corrigingo erro no commit AB#6 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ed07e33..38fc564 100644 --- a/README.md +++ b/README.md @@ -25,4 +25,4 @@ http://localhost:8080/swagger-ui/index.html ![](/assets/images/swagger.png) -minha primeira alteração no readme +minha primeira alteração no readme!! From 8bc62de0db570c60855129240f6fe4203a006dde Mon Sep 17 00:00:00 2001 From: pedro svicero Date: Mon, 22 Sep 2025 15:51:42 -0300 Subject: [PATCH 3/6] Adicionando Workflow com actions --- .github/workflows/03-minhas-actions.yaml | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/03-minhas-actions.yaml diff --git a/.github/workflows/03-minhas-actions.yaml b/.github/workflows/03-minhas-actions.yaml new file mode 100644 index 0000000..9be0684 --- /dev/null +++ b/.github/workflows/03-minhas-actions.yaml @@ -0,0 +1,29 @@ +name: 03 - Actions + +on: + push: + branches: "feature/**" + +jobs: + checkout_java_docker: + 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: Build + uses: docker/build-push-action@v6 + with: + push: false + + - name: Executar scripts + run: | + git branch + java --version + mvn clean package \ No newline at end of file From a5a01951452f20b3bf62eb123c4777102c8289ef Mon Sep 17 00:00:00 2001 From: pedro svicero Date: Mon, 22 Sep 2025 17:27:40 -0300 Subject: [PATCH 4/6] Adicionando CI --- .github/workflows/02-workflow-filtro.yaml | 13 +++++++++++++ .github/workflows/continous_integration.yaml | 20 ++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/02-workflow-filtro.yaml create mode 100644 .github/workflows/continous_integration.yaml diff --git a/.github/workflows/02-workflow-filtro.yaml b/.github/workflows/02-workflow-filtro.yaml new file mode 100644 index 0000000..3c016db --- /dev/null +++ b/.github/workflows/02-workflow-filtro.yaml @@ -0,0 +1,13 @@ +name: 02 - Workflow Filtro + +on: + push: + branches: 'feature/**' + +jobs: + echo: + runs-on: ubuntu-latest + steps: + - name: Exibir o evento + run: echo "Workflow disparado por ${{ github.event_name }}"cls + \ No newline at end of file diff --git a/.github/workflows/continous_integration.yaml b/.github/workflows/continous_integration.yaml new file mode 100644 index 0000000..7ae161d --- /dev/null +++ b/.github/workflows/continous_integration.yaml @@ -0,0 +1,20 @@ +name: Continuous Integration +on: + pull_request: + branches: + - develop +jobs: + tests: + 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 From f1d7d6d19de5c7b14de4d4ee87aad4c050389561 Mon Sep 17 00:00:00 2001 From: pedro svicero Date: Mon, 22 Sep 2025 17:32:43 -0300 Subject: [PATCH 5/6] update docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38fc564..c482df5 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 (validation) ./mvnw test From dad04813a3085de1d4badd726f6f7901d968fd1b Mon Sep 17 00:00:00 2001 From: pedro svicero Date: Mon, 22 Sep 2025 17:38:23 -0300 Subject: [PATCH 6/6] Codigo com bug --- .../fiap/simple_api_java/controller/ProdutoControllerTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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..5ffeabf 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 @@ -1,6 +1,5 @@ package com.github.fiap.simple_api_java.controller; -import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.*; import static org.mockito.BDDMockito.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; @@ -57,7 +56,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á"); } }