Update dependency com.puppycrawl.tools:checkstyle to v10 #199
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: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
# For maven project | |
build: | |
strategy: | |
max-parallel: 1 | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
java: [ 17 ] | |
runs-on: ${{ matrix.os }} | |
name: Maven Build with Java ${{ matrix.java }} on ${{ matrix.os }} | |
steps: | |
- name: "Checkout" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Java ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'adopt-hotspot' | |
- 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: "CheckStyle" | |
run: mvn validate --errors | |
- name: "Compile and Install" | |
run: mvn clean install -DskipTests --errors | |
- name: "Unit Tests" | |
run: mvn test --errors --fail-at-end | |
- name: "Integration Tests" | |
run: mvn failsafe:integration-test --errors --fail-at-end | |
# The following is only executed on Ubuntu on Java 17 | |
- name: "JaCoCo Coverage Report" | |
if: matrix.os == 'ubuntu-latest' && matrix.java == 17 && github.repository == 'castor-software/deptrim' | |
run: mvn jacoco:report | |
- name: "Codecov" | |
if: matrix.os == 'ubuntu-latest' && matrix.java == 17 && github.repository == 'castor-software/deptrim' | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./target/site/jacoco/jacoco.xml | |
flags: unittests | |
- name: "Cache SonarCloud" | |
if: matrix.os == 'ubuntu-latest' && matrix.java == 17 && github.repository == 'castor-software/deptrim' | |
uses: actions/cache@v3 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: "SonarCloud" | |
if: matrix.os == 'ubuntu-latest' && matrix.java == 17 && github.repository == 'castor-software/deptrim' | |
run: mvn sonar:sonar -Dsonar.projectKey=castor-software_deptrim -Dsonar.organization=castor-software -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.java.source=17 -Dsonar.java.target=17 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |