Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 31 additions & 27 deletions .github/workflows/pr-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,37 @@ on:
workflow_dispatch:

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
coverage:
runs-on: ubuntu-latest
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Degug SONAR_TOKEN
run: echo $SONAR_TOKEN

- name: Set up JDK11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'
- uses: actions/checkout@v3
- name: Set up JDK11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: 'maven'

- name: Build and Generate Coverage Report
run: |
mvn clean verify jacoco:report
- name: Build and Generate Coverage Report
run: |
mvn clean verify jacoco:report

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Run SonarQube analysis
run: |
mvn sonar:sonar \
-Dsonar.projectKey=sunbird-lern \
-Dsonar.organization=sunbird-lern \
-Dsonar.login=${{secrets.SONAR_TOKEN}} \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.coverage.jacoco.xmlReportPaths=all-actors/target/site/jacoco/jacoco.xml,notification-sdk/target/site/jacoco/jacoco.xml,service/target/site/jacoco/jacoco.xml
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Run SonarQube analysis
run: |
mvn sonar:sonar \
-Dsonar.projectKey=sunbird-lern \
-Dsonar.organization=sunbird-lern \
-Dsonar.login=$SONAR_TOKEN \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.coverage.jacoco.xmlReportPaths=all-actors/target/site/jacoco/jacoco.xml,notification-sdk/target/site/jacoco/jacoco.xml,service/target/site/jacoco/jacoco.xml
Loading