From 114126090f90d8a6697801bf4e8b7f85b951a1a5 Mon Sep 17 00:00:00 2001 From: letsdevapps Date: Sat, 2 May 2026 14:49:00 -0300 Subject: [PATCH 1/2] Criar github action workflow --- .github/workflows/build-ci.yml | 53 ++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build-ci.yml diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml new file mode 100644 index 0000000..c5d2950 --- /dev/null +++ b/.github/workflows/build-ci.yml @@ -0,0 +1,53 @@ +name: Build and Test Springboot Maven Modular + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Pega o código do repo + - name: Checkout repo + uses: actions/checkout@v4 + + # Setup Java + - name: Set up JDK 21 + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 21 + + # Cache do Maven (opcional, acelera builds) + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + # Build com Maven + - name: Build with Maven + run: mvn clean install --no-transfer-progress + + # Run tests + - name: Run tests + run: mvn test + + # Listar arquivos no target (debug) + - name: List target folder + run: ls -R target/ + + # Arquivos gerados (opcional) + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: springboot-maven-modular + # path: target/*.jar + path: module-application/target/*.jar From ac40a4b1260db6e93a0220dd91c7b268375890c5 Mon Sep 17 00:00:00 2001 From: letsdevapps Date: Sat, 2 May 2026 14:52:01 -0300 Subject: [PATCH 2/2] Criar github action workflow --- .github/workflows/build-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index c5d2950..44be887 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -42,7 +42,7 @@ jobs: # Listar arquivos no target (debug) - name: List target folder - run: ls -R target/ + run: ls -R module-application/target/ # Arquivos gerados (opcional) - name: Upload build artifacts