Atualizar .gitea/workflows/build.yaml
This commit is contained in:
@@ -6,32 +6,16 @@ on:
|
||||
branches: [ "main", "master" ]
|
||||
|
||||
jobs:
|
||||
# Job 1: Testes de Unidade
|
||||
testes:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: maven:3.9.6-eclipse-temurin-21 # Imagem oficial com tudo pronto
|
||||
steps:
|
||||
- name: Checkout do código
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configurar JDK 21
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'temurin'
|
||||
# Removido o cache para evitar o erro de timeout que vimos no log
|
||||
|
||||
- name: Corrigir Instalador e Instalar Maven
|
||||
run: |
|
||||
sudo dpkg --configure -a
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y maven
|
||||
|
||||
- name: Rodar Testes com Maven
|
||||
run: |
|
||||
# Se você tiver o arquivo mvnw no projeto, use: chmod +x mvnw && ./mvnw test
|
||||
# Caso contrário, usamos o maven instalado:
|
||||
# mvn -B test
|
||||
chmod +x mvnw && ./mvnw test
|
||||
run: mvn -B test # Aqui o 'mvn' já vai funcionar direto
|
||||
|
||||
# Job 2: Trigger da API (Só roda se os testes passarem)
|
||||
deploy-trigger:
|
||||
|
||||
Reference in New Issue
Block a user