Skip to content

Commit 6e75484

Browse files
authored
fix: add code revieve pipeline (#11)
1 parent ad7a169 commit 6e75484

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/code-review.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: EMD - CodeReview
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout sources
15+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Java
20+
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1
21+
with:
22+
distribution: 'corretto'
23+
java-version: 17
24+
25+
- name: Set up Apache Maven
26+
uses: actions/setup-java@v3
27+
with:
28+
distribution: 'corretto'
29+
java-version: '17'
30+
cache: 'maven'
31+
32+
- name: Build with Maven
33+
run: mvn clean install
34+
35+
- name: Copy dependencies
36+
run: mvn dependency:copy-dependencies
37+
38+
- name: SonarCloud Scan
39+
uses: sonarsource/sonarcloud-github-action@e44258b109568baa0df60ed515909fc6c72cba92 #v2.3.0
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
43+
with:
44+
args: >
45+
-Dsonar.organization=${{ vars.SONARCLOUD_ORG }}
46+
-Dsonar.projectKey=${{ vars.SONARCLOUD_PROJECT_KEY }}
47+
-Dsonar.projectName="${{ vars.SONARCLOUD_PROJECT_NAME }}"
48+
-Dsonar.java.binaries=target/classes
49+
-Dsonar.java.libraries=target/dependency/*.jar
50+
-Dsonar.exclusions=**/enums/**,**/model/**,**/stub/**,**/dto/**,**/*Constant*,**/*Config.java,**/*Scheduler.java,**/*Application.java,**/src/test/**,**/Dummy*.java

0 commit comments

Comments
 (0)