diff --git a/.github/workflows/continuous_integration.yaml b/.github/workflows/continuous_integration.yaml new file mode 100644 index 0000000..295a1d6 --- /dev/null +++ b/.github/workflows/continuous_integration.yaml @@ -0,0 +1,20 @@ +name: Continuous Integration +on: + pull_request: + types: [opened, reopened] + branches: "feature/**" +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 diff --git a/compose.yaml b/compose.yaml index b7dc1b5..b66ca0a 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://db-tdsor-api-dev.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..c200afe 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á"); } }