Skip to content

Commit

Permalink
Issue #000: feat: Using GitHub Actions for Pull Request Analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
maheshkumargangula committed Aug 8, 2024
1 parent 53f59db commit 50094cc
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pull-request
name: Pull Request Analysis

on:
pull_request:
Expand All @@ -18,6 +18,44 @@ jobs:

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Restore Maven cache
uses: actions/cache@v3
with:
path: ~/.m2
key: groups-dependency-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
groups-dependency-cache-
- name: Build and Run test cases
run: mvn clean install

- name: Save the build artifact
run: cd service && mvn play2:dist

- name: Save Maven cache
uses: actions/cache@v3
with:
path: ~/.m2
key: groups-dependency-cache-${{ hashFiles('**/pom.xml') }}

- name: Store build artifact
uses: actions/upload-artifact@v3
with:
name: group-service
path: service/target/group-service-1.0.0-dist.zip

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'


- name: Run SonarQube analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn verify -DskipTests sonar:sonar -Dsonar.projectKey=Sunbird-Lern_groups-service -Dsonar.organization=sunbird-lern -Dsonar.host.url=https://sonarcloud.io -Dsonar.coverage.exclusions=**/cassandra-utils/**,**/platform-cache/**,**/sb-actor/**,**/sb-telemetry-utils/**,**/sb-utils/**,**/models/**,**/bean/*,**/sb-common/** -Dsonar.coverage.jacoco.xmlReportPaths=/home/runner/work/groups-service/groups-service/reports/target/jacoco/jacoco.xml

0 comments on commit 50094cc

Please sign in to comment.