Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configurar Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
cache: maven

- name: Executar testes
run: ./mvnw --batch-mode --no-transfer-progress verify
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ Projeto desenvolvido em parceria por [Flpvoigt](https://github.com/Flpvoigt) e

## Requisitos

- Java 25
- Java 21 ou superior
- Maven Wrapper incluído no projeto

## Como executar

No Windows, execute `iniciar.cmd`. O script utiliza o JDK 25 armazenado em
`.tools` somente durante a execução deste projeto.
No Windows, confirme que o Java está disponível no `PATH` e execute
`iniciar.cmd`. Também é possível iniciar a aplicação diretamente:

```powershell
.\mvnw.cmd spring-boot:run
```

## Endpoints

Expand All @@ -26,7 +30,7 @@ No Windows, execute `iniciar.cmd`. O script utiliza o JDK 25 armazenado em

## Testes

Com o Java 25 configurado, execute:
Com o Java 21 ou superior configurado, execute:

```powershell
.\mvnw.cmd test
Expand Down
14 changes: 5 additions & 9 deletions iniciar.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@ setlocal

cd /d "%~dp0"

set "JAVA_HOME=%~dp0.tools\jdk-25\jdk-25.0.2"
set "PATH=%JAVA_HOME%\bin;%PATH%"

if not exist "%JAVA_HOME%\bin\java.exe" (
where java >nul 2>nul
if errorlevel 1 (
echo.
echo ERRO: JDK 25 local nao encontrado.
echo Caminho esperado:
echo %JAVA_HOME%
echo ERRO: Java 21 ou superior nao foi encontrado no PATH.
echo.
pause
exit /b 1
)

echo.
echo Java utilizado neste projeto:
"%JAVA_HOME%\bin\java.exe" -version
java -version

echo.
echo Iniciando Spring JJW...
Expand All @@ -36,4 +32,4 @@ if %CODIGO_SAIDA% equ 0 (
)

endlocal
pause
pause
Empty file modified mvnw
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<url/>
</scm>
<properties>
<java.version>25</java.version>
<java.version>21</java.version>
</properties>
<dependencies>

Expand Down
Loading