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/README.md b/README.md index 541f35a..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 @@ -25,3 +25,4 @@ http://localhost:8080/swagger-ui/index.html ![](/assets/images/swagger.png) +Editando para mostrar no Azure DevOps 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..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á"); } }