Skip to content

chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 3.9.1.2184 to 4.0.0.4121 #196

chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 3.9.1.2184 to 4.0.0.4121

chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 3.9.1.2184 to 4.0.0.4121 #196

name: Build & Code Quality Checks
on:
pull_request:
branches: [ 'master', 'develop' ]
types: [ 'opened', 'reopened', 'synchronize' ]
jobs:
unit_test_and_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 20
uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.8.6
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
- name: Setup
run: mvn clean && mvn templating:filter-sources
- name: Unit Test and Build
run: mvn clean install
# - name: Jacoco Badge generator
# uses: cicirello/jacoco-badge-generator@v2
# with:
# generate-summary: true
# jacoco-csv-file: analytics-cli/target/site/jacoco-aggregate/jacoco.csv
#
# - name: Commit and push the badge (if it changed)
# uses: EndBug/add-and-commit@v9.1.1
# with:
# default_author: github_actions
# message: 'commit badge'
# add: '*.svg'
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: Coverage report
path: |
analytics-cli/target/site/jacoco-aggregate/
- name: PMD lint checking
run: |
mvn pmd:pmd
mvn pmd:cpd
- name: Upload PMD lint report
uses: actions/upload-artifact@v3
with:
name: PMD lint report
path: |
analytics-core/target/site
analytics/target/site
- name: Checkstyle lint checking
run: mvn checkstyle:checkstyle
- name: Upload Checklist lint report
uses: actions/upload-artifact@v3
with:
name: Checklist lint report
path: |
analytics-core/target/site
analytics/target/site
- name: Sonar analysis
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn sonar:sonar