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
24 changes: 11 additions & 13 deletions .github/workflows/pr-actions.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: PR Coverage Check

on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
pull_request:
branches:
- '**'

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

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

- name: Build and Generate Coverage Report
run: |
Expand All @@ -29,14 +26,15 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

distribution: 'temurin'

- name: Run SonarQube analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
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