Skip to content

Commit e524cc6

Browse files
Updated yml with docker
1 parent c74e9e3 commit e524cc6

File tree

2 files changed

+19
-25
lines changed

2 files changed

+19
-25
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,11 @@ jobs:
2424
- name: Start Docker Services
2525
run: |
2626
docker compose -f .github/workflows/docker-compose-h2.yml up -d
27-
sleep 15 # Wait for the ChainTest service to start completely
27+
sleep 15 # Wait for the service to initialize
2828
2929
# Step 4: Verify ChainTest service is running
30-
- name: Verify ChainTest is Running
30+
- name: Verify ChainTest Service is Running
3131
run: curl --fail http://localhost:80/ || exit 1
32-
env:
33-
SPRING_PROFILES_ACTIVE: h2
34-
SPRING_DATASOURCE_URL: jdbc:h2:file:./data/db
35-
SPRING_DATASOURCE_DRIVERCLASSNAME: org.h2.Driver
3632

3733
# Step 5: Set up Java (Temurin 17)
3834
- name: Set up Java
@@ -42,7 +38,7 @@ jobs:
4238
distribution: 'temurin'
4339

4440
# Step 6: Cache Maven packages for faster builds
45-
- name: Cache Maven Packages
41+
- name: Cache Maven Dependencies
4642
uses: actions/cache@v4
4743
with:
4844
path: ~/.m2
@@ -54,40 +50,37 @@ jobs:
5450
- name: Install Dependencies
5551
run: mvn install -DskipTests
5652

57-
# Step 8: Set up Xvfb (if GUI applications like Selenium require it)
53+
# Step 8: Set up Xvfb (for GUI-based tests, e.g., Selenium)
5854
- name: Set up Xvfb
5955
run: |
6056
sudo apt-get update
6157
sudo apt-get install -y xvfb
62-
Xvfb :99 & # Start Xvfb on display :99
63-
export DISPLAY=:99 # Set DISPLAY variable for GUI apps
58+
Xvfb :99 &
59+
export DISPLAY=:99
6460
65-
# Step 9: Run Selenium tests
61+
# Step 9: Run Selenium Tests
6662
- name: Run Selenium Tests
67-
run: |
68-
export DISPLAY=:99 # Ensure DISPLAY is set
69-
mvn test
63+
run: mvn test
7064
env:
71-
DISPLAY: :99 # Ensure the same environment variable is available
65+
DISPLAY: :99
7266

73-
# Step 10: Archive test reports
67+
# Step 10: Archive Test Reports
7468
- name: Archive Test Reports
7569
uses: actions/upload-artifact@v4
76-
if: ${{ always() }} # Run this step even if tests fail
7770
with:
7871
name: Reports
79-
path: target/chaintest/ # Archive the entire chaintest directory
72+
path: target/chaintest/ # Adjust this path if your reports are elsewhere
8073
retention-days: 7
8174

82-
# Step 11: Stop Docker services
75+
# Step 11: Stop Docker Services
8376
- name: Stop Docker Services
8477
if: always()
8578
run: docker compose -f .github/workflows/docker-compose-h2.yml down
8679

8780
deploy-pages:
8881
name: Deploy Reports to GitHub Pages
8982
runs-on: ubuntu-latest
90-
if: ${{ always() }} # Ensure this step runs even if tests fail
83+
if: ${{ always() }} # Runs even if previous job fails
9184
needs: run-tests
9285
permissions:
9386
contents: write
@@ -104,14 +97,14 @@ jobs:
10497
name: Reports
10598
path: ./target/chaintest
10699

107-
# Step 3: Prepare reports for deployment
108-
- name: Prepare Report for Deployment
100+
# Step 3: Prepare Reports for Deployment
101+
- name: Prepare Reports
109102
run: |
110103
mkdir -p public
111104
cp -R target/chaintest/* public/
112-
mv public/Index.html public/index.html # Ensure index.html for GitHub Pages
105+
mv public/Index.html public/index.html
113106
114-
# Step 4: Deploy reports to GitHub Pages
107+
# Step 4: Deploy to GitHub Pages
115108
- name: Deploy to GitHub Pages
116109
uses: peaceiris/actions-gh-pages@v3
117110
with:

src/test/resources/chaintest.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ chaintest.storage.service.container-name=
1212
## chainlp
1313
chaintest.generator.chainlp.enabled=true
1414
chaintest.generator.chainlp.class-name=com.aventstack.chaintest.generator.ChainLPGenerator
15-
chaintest.generator.chainlp.host.url=http://localhost/
15+
chaintest.generator.chainlp.host.url=https://sandipchopkar95.github.io/
16+
#chaintest.generator.chainlp.host.url=http://localhost/
1617
chaintest.generator.chainlp.client.request-timeout-s=30
1718
chaintest.generator.chainlp.client.expect-continue=false
1819
chaintest.generator.chainlp.client.max-retries=3

0 commit comments

Comments
 (0)