File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Test Spring Boot HATEOAS
2+
3+ # Pode rodar manualmente ou em push
4+ on :
5+ push :
6+ branches : [ main ]
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ # Pega o código do repo
15+ - name : Checkout repo
16+ uses : actions/checkout@v4
17+
18+ # Setup Java
19+ - name : Set up JDK 21
20+ uses : actions/setup-java@v3
21+ with :
22+ distribution : temurin
23+ java-version : 21
24+
25+ # Cache do Maven (opcional, acelera builds)
26+ - name : Cache Maven packages
27+ uses : actions/cache@v3
28+ with :
29+ path : ~/.m2/repository
30+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
31+ restore-keys : |
32+ ${{ runner.os }}-maven-
33+
34+ # Build com Maven
35+ - name : Build with Maven
36+ run : mvn clean install --no-transfer-progress
37+
38+ # Run tests
39+ - name : Run tests
40+ run : mvn test
41+
42+ # Arquivos gerados (opcional)
43+ - name : Upload build artifacts
44+ uses : actions/upload-artifact@v4
45+ with :
46+ name : target
47+ path : target/
48+
You can’t perform that action at this time.
0 commit comments