fix: release all Java modules with version 3.1.2 #215
Workflow file for this run
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 & 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 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'zulu' # Alternative distribution options are available. | |
- 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 }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=rudderlabs_rudder-sdk-java |