diff --git a/.githhub/workflows/03-minhas-actions.yaml b/.githhub/workflows/03-minhas-actions.yaml new file mode 100644 index 0000000..9be0684 --- /dev/null +++ b/.githhub/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 diff --git a/.githhub/workflows/continuous-integration.yaml b/.githhub/workflows/continuous-integration.yaml new file mode 100644 index 0000000..295a1d6 --- /dev/null +++ b/.githhub/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/.gitignore b/.gitignore index 549e00a..064e463 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,4 @@ build/ ### VS Code ### .vscode/ +.vs/ \ No newline at end of file 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á"); } }