Prepare next dev - 20.2.0-SNAPSHOT #4271
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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Build | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }} | |
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v1 | |
if: ${{ env.SONAR_TOKEN != 0 }} | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v1 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Maven install (skip test) | |
run: mvn install -DskipTests=true -B -V -Psource-quality | |
- name: Maven test + SonarCloud | |
if: ${{ env.SONAR_TOKEN != 0 }} | |
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar | |
-Dsonar.java.source=17 | |
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} | |
-Dsonar.organization=${{ env.SONAR_ORGANIZATION }} | |
-Dsonar.host.url=https://sonarcloud.io | |
-Dsonar.coverage.jacoco.xmlReportPaths=$(find "$(pwd)" -path '*lighty-tests-report/target/site/jacoco-report/jacoco.xml') | |
-Dsonar.coverage.exclusions=**/lighty-codecs/**/* | |
- name: Maven test no SonarCloud | |
if: ${{ env.SONAR_TOKEN == 0 }} | |
run: mvn -B verify | |
- name: Upload surefire test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Surefire-Test-Results | |
path: ~/**/surefire-reports/**/*.txt | |
lighty_rnc_app_test: | |
uses: ./.github/workflows/test-lighty-app.yml | |
with: | |
app-name: lighty-rnc-app | |
test-script-file: ${GITHUB_WORKSPACE}/.github/workflows/lighty-rnc-app/tests-lighty-rnc-app.sh | |
lighty_rcgnmi_app_test: | |
uses: ./.github/workflows/test-lighty-app.yml | |
with: | |
app-name: lighty-rcgnmi-app | |
test-script-file: ${GITHUB_WORKSPACE}/.github/workflows/lighty-rcgnmi-app/tests-lighty-rcgnmi-app.sh | |
lighty_rnc_cluster_app_test: | |
uses: ./.github/workflows/test-lighty-app.yml | |
with: | |
app-name: lighty-rnc-app | |
test-script-file: ${GITHUB_WORKSPACE}/.github/workflows/lighty-rnc-app/test-lighty-rnc-app-cluster.sh | |
override-helm-values: lighty.replicaCount=3,lighty.akka.isSingleNode=false,nodePort.useNodePort=false,lighty.moduleTimeOut=120,resources=null |