This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
build(deps): bump org.apache.maven.plugins:maven-surefire-plugin from 3.5.0 to 3.5.2 #149
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: PR | |
on: | |
pull_request: | |
types: | |
jobs: | |
compilation: | |
name: Code Checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Configure JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Compilation | |
run: ./mvnw --no-transfer-progress clean compile -DskipTests | |
- name: Google Checkstyle | |
run: ./mvnw --no-transfer-progress checkstyle:checkstyle -Dskip.checkstyle=false | |
- name: Unit tests | |
run: ./mvnw --no-transfer-progress clean test | |
- name: Integration tests | |
run: ./mvnw --no-transfer-progress verify | |
- name: JaCoco | |
uses: cicirello/jacoco-badge-generator@v2 | |
id: jacoco | |
with: | |
generate-branches-badge: true | |
jacoco-csv-file: target/site/jacoco-merged-test-coverage-report/jacoco.csv | |
- name: Log Coverage | |
run: | | |
echo "Coverage = ${{ steps.jacoco.outputs.coverage }}" | |
echo "Branch Coverage = ${{ steps.jacoco.outputs.branches }}" | |
- name: Commit badge | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
message: 'ci: update jacoco badges' | |
add: '*.svg' | |
fetch: false | |
- name: SonarCloud | |
run: ./mvnw --no-transfer-progress clean verify package test sonar:sonar -Dsonar.projectKey=ricardo-campos-org_fastvagas-java -Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco-merged-test-coverage-report/jacoco.xml | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
security: | |
name: Security | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
needs: | |
- compilation | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Init CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
debug: true | |
languages: java | |
- name: Configure JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Auto Build | |
uses: github/codeql-action/autobuild@v3 | |
- name: CodeQL | |
uses: github/codeql-action/analyze@v3 |