-
Notifications
You must be signed in to change notification settings - Fork 141
40 lines (34 loc) · 1.2 KB
/
pr_actions.yml
File metadata and controls
40 lines (34 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: PR Code Coverage
on:
pull_request:
branches: '**'
jobs:
pr-coverage:
runs-on: ubuntu-latest
steps:
- 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 install -DskipTests
cd service
mvn clean verify jacoco:report
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
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.host.url=https://sonarcloud.io \
-Dsonar.coverage.jacoco.xmlReportPaths=service/target/site/jacoco/jacoco.xml