Atualizar .gitea/workflows/build.yaml
This commit is contained in:
@@ -6,32 +6,16 @@ on:
|
|||||||
branches: [ "main", "master" ]
|
branches: [ "main", "master" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Job 1: Testes de Unidade
|
|
||||||
testes:
|
testes:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: maven:3.9.6-eclipse-temurin-21 # Imagem oficial com tudo pronto
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout do código
|
- name: Checkout do código
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Rodar Testes com Maven
|
||||||
run: |
|
run: mvn -B test # Aqui o 'mvn' já vai funcionar direto
|
||||||
# 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
|
|
||||||
|
|
||||||
# Job 2: Trigger da API (Só roda se os testes passarem)
|
# Job 2: Trigger da API (Só roda se os testes passarem)
|
||||||
deploy-trigger:
|
deploy-trigger:
|
||||||
|
|||||||
Reference in New Issue
Block a user