generated from keploy/template
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: charankamarapu <kamarapucharan@gmail.com>
- Loading branch information
1 parent
8d0a976
commit 22b0be2
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: 'petclinic-junit' | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
- name: Set up Maven | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'maven' | ||
maven-version: '3.8.4' | ||
|
||
- name: Download and prepare Keploy binary | ||
run: | | ||
curl --silent --location 'https://github.com/keploy/keploy/releases/latest/download/keploy_linux_arm64.tar.gz' | tar xz -C /tmp | ||
sudo mkdir -p /usr/local/bin && sudo mv /tmp/keploy /usr/local/bin/keploybin | ||
- name: Build and test with Maven and Keploy | ||
run: | | ||
cd spring-petclinic/spring-petclinic-rest | ||
mvn clean install -Dmaven.test.skip=true | ||
sudo -E env PATH="$PATH" keploybin test -c "mvn test" --delay 30 --coverage | ||
- name: SonarQube Analysis | ||
run: | | ||
cd spring-petclinic/spring-petclinic-rest | ||
mvn clean install -Dmaven.test.skip=true | ||
sudo -E env PATH="$PATH" keploybin test -c "mvn verify sonar:sonar -Dsonar.projectKey=msil-test-new -Dsonar.coverage.jacoco.xmlReportPaths=target/site/e2e-ut-aggregate/jacoco.xml" --delay 30 --coverage | ||
# Add additional steps for coverage threshold enforcement if needed |