Skip to content

Commit 641a4fc

Browse files
committed
ci: deploy reports
1 parent ad1094a commit 641a4fc

File tree

2 files changed

+73
-27
lines changed

2 files changed

+73
-27
lines changed

.github/workflows/build-feature.yml

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ jobs:
8787

8888
non_regression_test:
8989
name: Non Regression Test
90-
environment:
91-
name: dev-karate-report
92-
url: ${{ steps.deployment.outputs.page_url }}karate/karate-summary.html
90+
# environment:
91+
# name: dev-karate-report
92+
# url: ${{ steps.deployment.outputs.page_url }}karate/karate-summary.html
9393
needs: deploy
9494
runs-on: ubuntu-latest
9595
steps:
@@ -118,29 +118,32 @@ jobs:
118118
- name: Non Regression Test
119119
continue-on-error: true
120120
run: |
121-
mvn clean test --f ./nrt/pom.xml -PflyServer -Dapi.url='https://spring-boot-asynchronous-api.fly.dev'
121+
mvn clean test --f ./nrt/pom.xml -PflyServer -Dapi.url='https://spring-boot-asynchronous-api.fly.dev'
122122
123123
# Create a "doc" directory and move karate reports to it
124124
- name: Get report
125125
run: |
126126
mkdir -p doc
127127
mv ./nrt/target/karate-reports/* ./doc
128128
129-
- name: Upload artifact
130-
uses: actions/upload-pages-artifact@v1
129+
- uses: actions/upload-artifact@master
131130
with:
132-
# Upload entire repository
133-
path: './doc'
134-
- name: Deploy to GitHub Pages
135-
id: deployment
136-
uses: actions/deploy-pages@v1
131+
name: karate
132+
path: doc/karate
133+
# - name: Upload artifact
134+
# uses: actions/upload-pages-artifact@v1
135+
# with:
136+
# # Upload entire repository
137+
# path: './doc'
138+
# - name: Deploy to GitHub Pages
139+
# id: deployment
140+
# uses: actions/deploy-pages@v1
137141

138142
loading_test:
139143
name: Loading Test
140-
environment:
141-
name: prep-loading-report
142-
# needs: non_regression_test
143-
url: ${{ steps.deployment.outputs.page_url }}gatling/summary.html
144+
# environment:
145+
# name: prep-loading-report
146+
# url: ${{ steps.deployment.outputs.page_url }}gatling/summary.html
144147
needs: non_regression_test
145148
runs-on: ubuntu-latest
146149
steps:
@@ -160,6 +163,42 @@ jobs:
160163
.github/scripts/extract_and_generate_html.sh
161164
shell: bash
162165

166+
- uses: actions/upload-artifact@master
167+
with:
168+
name: gatling
169+
path: doc/gatling
170+
171+
# - name: Upload artifact
172+
# uses: actions/upload-pages-artifact@v1
173+
# with:
174+
# # Upload entire repository
175+
# path: './doc'
176+
# - name: Deploy to GitHub Pages
177+
# id: deployment
178+
# uses: actions/deploy-pages@v1
179+
180+
deploy_reports:
181+
name: Deploy Reports
182+
needs:
183+
- non_regression_test
184+
- loading_test
185+
runs-on: ubuntu-latest
186+
steps:
187+
- name: Checkout
188+
uses: actions/checkout@v3
189+
190+
- name: Retrieve saved Non Regression Test
191+
uses: actions/download-artifact@v3
192+
with:
193+
name: karate
194+
path: doc/karate
195+
196+
- name: Retrieve saved Loading Test
197+
uses: actions/download-artifact@v3
198+
with:
199+
name: gatling
200+
path: doc/gatling
201+
163202
- name: Upload artifact
164203
uses: actions/upload-pages-artifact@v1
165204
with:
@@ -168,3 +207,8 @@ jobs:
168207
- name: Deploy to GitHub Pages
169208
id: deployment
170209
uses: actions/deploy-pages@v1
210+
211+
- name: Echo URL Reports
212+
run: |
213+
echo "Non Regression Test url : ${{ steps.deployment.outputs.page_url }}karate/karate-summary.html"
214+
echo "Loading Test url : ${{ steps.deployment.outputs.page_url }}gatling/summary.html"

Readme.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
## Overview
6-
This project is a sample of an asynchronous API built in Spring Boot. It provides asynchronous endpoints that are called asynchronously and can be used as a starting point to build more complex systems.
6+
Spring-Boot-Asynchronous-API is a sample project showcasing the implementation of an asynchronous API built using Spring Boot. It offers asynchronous endpoints, allowing for concurrent and non-blocking execution, making it an excellent foundation for developing more complex systems.
77

88
## Prerequisites
99
* Java 19
@@ -21,13 +21,14 @@ mvn spring-boot:run
2121
```
2222
Once the server is up and running, you can access the web service at http://localhost:8080/.
2323

24-
## how run nrt locally:
24+
## Running Non-Regression Tests Locally:
25+
You can run non-regression tests locally with the following command:
2526
```shell
2627
mvn clean test -D"skip.tests"=false -Plocal -Dapi.url=http://localhost:8080
2728
```
2829

29-
// TODO
30-
## how run nrt locally:
30+
## Running Gatling Loading Tests Locally:
31+
To run Gatling loading tests locally, navigate to the loading directory and use the following command:
3132
```shell
3233
cd loading
3334
mvn -Dgatling.simulation.name=HttpSimulation4 clean gatling:test
@@ -43,11 +44,11 @@ Github Actions is a CI/CD platform that allows developers to automate their work
4344
4. Deploy in Dev environment
4445
-[swagger documentation](https://spring-boot-asynchronous-api.fly.dev/swagger-ui/index.html)
4546
5. Run non regression tests & publish the generated reports
46-
-[karate report]( https://raouf25.github.io/spring-boot-asynchronous-api/karate-summary.html )
47+
-[karate report](https://raouf25.github.io/spring-boot-asynchronous-api/karate/karate-summary.html)
4748

4849
The workflow also runs non-regression tests as part of the build process. The reports are published to the `reports` directory and can be accessed from the Github Actions UI. The reports can also be generated locally using the `mvn test` command.
4950
6. Run loading tests & publish the generated reports
50-
-[gatling report](https://raouf25.github.io/spring-boot-asynchronous-api/gatling-summary.html )
51+
-[gatling report](https://raouf25.github.io/spring-boot-asynchronous-api/gatling/summary.html)
5152

5253
## Documentation
5354
For more information, please refer to the :
@@ -57,9 +58,10 @@ For more information, please refer to the :
5758
- [gatling loading test](https://github.com/krizsan/gatling-examples)
5859

5960
---------------
60-
## Steps of project building:
61-
1. ✅ Rest API implementation: [swagger documentation](https://spring-boot-asynchronous-api.fly.dev/swagger-ui/index.html)
62-
2. ✅ Non Regression Test: [karate report]( https://raouf25.github.io/spring-boot-asynchronous-api/karate-summary.html )
63-
3. ✅ Code coverage (sonar & jacoco): [code coverage in sonar](https://sonarcloud.io/summary/new_code?id=Raouf25_spring-boot-asynchronous-api)
64-
4. ✅ Loading Test: [gatling report](https://raouf25.github.io/spring-boot-asynchronous-api/gatling-summary.html )
65-
5. 🚧 CI/CD releasing
61+
## Project Building Steps:
62+
The project building steps are as follows:
63+
1. ✅ Implement the REST API. You can access the [Swagger documentation](https://spring-boot-asynchronous-api.fly.dev/swagger-ui/index.html)
64+
2. ✅ Perform Non-Regression Testing. Review [Karate report](https://raouf25.github.io/spring-boot-asynchronous-api/karate/karate-summary.html)
65+
3. ✅ Monitor and Improve Code Coverage. View [code coverage in sonar](https://sonarcloud.io/summary/new_code?id=Raouf25_spring-boot-asynchronous-api)
66+
4. ✅ Run Loading Tests. Explore the [Gatling report](https://raouf25.github.io/spring-boot-asynchronous-api/gatling/summary.html)
67+
5. 🚧 Ongoing work on CI/CD and releases.

0 commit comments

Comments
 (0)