-
Notifications
You must be signed in to change notification settings - Fork 10
38 lines (30 loc) · 1.02 KB
/
CI.yml
File metadata and controls
38 lines (30 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Nome do fluxo
name: CI
# Aciona o fluxo quando:
on:
# Houver um pull
pull_request:
branches: [ "main" ]
# Permite a execução manual
workflow_dispatch:
# Fluxo de trabalho
jobs:
CI:
runs-on: ubuntu-latest
# Passos do fluxo de trabalho
steps:
- name: Checkout do repositório
uses: actions/checkout@v3
- name: Preparando JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
cache: maven
- name: Executando testes
run: mvn -B -f pom.xml test jacoco:prepare-agent jacoco:report
- name: SonarCloud Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=guilherme2041 -Dsonar.projectKey=Guilherme2041_java-api -Dsonar.language=java -Dsonar.java.coveragePlugin=jacoco -Dmaven.test.skip=true