INFRA-2108 | Ankit Bhardwaj | Add workflows for checkstyle and sonarqube
This commit is contained in:
23
.github/workflows/checkstyle_analysis.yml
vendored
Normal file
23
.github/workflows/checkstyle_analysis.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: CheckStyle Analysis
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
CheckStyle:
|
||||
runs-on: "docker"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: CheckStyle
|
||||
uses: navi-synced-actions/action-checkstyle-to-pr@v0.8.4
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
reporter: github-pr-check
|
||||
level: warning
|
||||
checkstyle_config: checkstyle_rules.xml
|
||||
22
.github/workflows/sonarqube_analysis.yml
vendored
Normal file
22
.github/workflows/sonarqube_analysis.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: SonarQube Analysis
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
jobs:
|
||||
SonarQube:
|
||||
runs-on: "docker"
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Build and analyze
|
||||
run: mvn clean verify -DskipTests && mvn sonar:sonar -Dsonar.projectKey="${{ secrets.SONAR_PROJECT_KEY }}" -Dsonar.host.url="${{ secrets.SONAR_HOST_URL }}" -Dsonar.login="${{ secrets.SONAR_TOKEN }}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user