18 #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build | |
run: | | |
echo Iniciando Build... | |
echo Branch utilizada ${{ github.ref_name }}, Evento ${{ github.event_name }}. | |
- name: Checkout Repositorio | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
#- name: Run Checkstyle | |
# run: mvn checkstyle:check | |
- name: Build with Maven | |
run: mvn -B clean compile -DskipTests | |
test: | |
needs: compile | |
runs-on: ubuntu-latest | |
steps: | |
- name: Test | |
run: echo Iniciando Test... | |
- name: Checkout Repositorio | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Executar Testes | |
run: mvn clean test | |
build: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build | |
run: | | |
echo Iniciando Build... | |
echo Branch utilizada ${{ github.ref_name }}, Evento ${{ github.event_name }}. | |
- name: Checkout Repositorio | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B clean package -DskipTests | |