Skip to content

Classe de utilidades #77

Classe de utilidades

Classe de utilidades #77

Workflow file for this run

name: Build and Test Java Multi-Module Project
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4 # Checkout do código
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn -B clean install
- name: Run Tests
run: mvn test
- name: Package Application
run: mvn package
- name: Archive build artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: jar-files
path: '**/target/*.jar'