Skip to content

Commit 570c96e

Browse files
Merge pull request #152 from chethann007/gh-actions
SBCOSS-427: Sunbird Notification service - add the GitHub actions
2 parents 6f07dfd + a10c67a commit 570c96e

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

.github/workflows/pr-actions.yml

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,37 @@ on:
66
workflow_dispatch:
77

88
jobs:
9-
coverage:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v3
9+
coverage:
10+
runs-on: ubuntu-latest
11+
env:
12+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
13+
steps:
14+
- name: Degug SONAR_TOKEN
15+
run: echo $SONAR_TOKEN
1316

14-
- name: Set up JDK11
15-
uses: actions/setup-java@v3
16-
with:
17-
java-version: '11'
18-
distribution: 'temurin'
19-
cache: 'maven'
17+
- uses: actions/checkout@v3
18+
- name: Set up JDK11
19+
uses: actions/setup-java@v3
20+
with:
21+
java-version: '11'
22+
distribution: 'temurin'
23+
cache: 'maven'
2024

21-
- name: Build and Generate Coverage Report
22-
run: |
23-
mvn clean verify jacoco:report
25+
- name: Build and Generate Coverage Report
26+
run: |
27+
mvn clean verify jacoco:report
2428
25-
- name: Set up JDK 17
26-
uses: actions/setup-java@v2
27-
with:
28-
distribution: 'temurin'
29-
java-version: '17'
30-
31-
- name: Run SonarQube analysis
32-
run: |
33-
mvn sonar:sonar \
34-
-Dsonar.projectKey=sunbird-lern \
35-
-Dsonar.organization=sunbird-lern \
36-
-Dsonar.login=${{secrets.SONAR_TOKEN}} \
37-
-Dsonar.host.url=https://sonarcloud.io \
38-
-Dsonar.coverage.jacoco.xmlReportPaths=all-actors/target/site/jacoco/jacoco.xml,notification-sdk/target/site/jacoco/jacoco.xml,service/target/site/jacoco/jacoco.xml
29+
- name: Set up JDK 17
30+
uses: actions/setup-java@v2
31+
with:
32+
distribution: 'temurin'
33+
java-version: '17'
34+
35+
- name: Run SonarQube analysis
36+
run: |
37+
mvn sonar:sonar \
38+
-Dsonar.projectKey=sunbird-lern \
39+
-Dsonar.organization=sunbird-lern \
40+
-Dsonar.login=$SONAR_TOKEN \
41+
-Dsonar.host.url=https://sonarcloud.io \
42+
-Dsonar.coverage.jacoco.xmlReportPaths=all-actors/target/site/jacoco/jacoco.xml,notification-sdk/target/site/jacoco/jacoco.xml,service/target/site/jacoco/jacoco.xml

0 commit comments

Comments
 (0)