Skip to content

Bump pmd.version from 7.5.0 to 7.6.0 (#529) #1167

Bump pmd.version from 7.5.0 to 7.6.0 (#529)

Bump pmd.version from 7.5.0 to 7.6.0 (#529) #1167

Workflow file for this run

name: slf4j-test CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17, 21, 23 ]
name: Java ${{ matrix.java }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build with Maven
run: mvn clean verify
- name: Publish test coverage data to Coveralls
if: matrix.java == '17'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
run: |
if [[ -n $COVERALLS_REPO_TOKEN ]]; then
mvn coveralls:report -DrepoToken=${COVERALLS_REPO_TOKEN} -D branch=${BRANCH_NAME_OR_REF} -DpullRequest=${{github.event.pull_request.number}};
else
echo No COVERALLS_REPO_TOKEN, the test coverage publishing to Coveralls is skipped;
fi;
- name: Analyze with Codacy
if: matrix.java == '11'
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
run: |
if [[ -n $CODACY_PROJECT_TOKEN && -n $CODACY_API_TOKEN ]]; then
mvn com.gavinmogan:codacy-maven-plugin:coverage -DcoverageReportFile=target/site/jacoco/jacoco.xml -DprojectToken=${CODACY_PROJECT_TOKEN} -DapiToken=${CODACY_API_TOKEN} -Dcommit=${GITHUB_SHA};
else
echo No CODACY_PROJECT_TOKEN and/or CODACY_API_TOKEN, the publishing to Codacy is skipped;
fi;
- name: Analyze with SonarCloud
if: matrix.java == '17'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
if [[ -n $GITHUB_TOKEN && -n $SONAR_TOKEN ]]; then
mvn sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=valfirst-github -Dsonar.projectKey=com.github.valfirst:slf4j-test -Dsonar.token=${SONAR_TOKEN} -Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }} -Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }} -Dsonar.pullrequest.key=${{github.event.pull_request.number}};
else
echo No GITHUB_TOKEN and/or SONAR_TOKEN, the publishing to SonarCloud is skipped;
fi;