Skip to content

Commit 3abdd9c

Browse files
committed
Initialize
0 parents  commit 3abdd9c

27 files changed

Lines changed: 826 additions & 0 deletions

.github/workflows/e2e.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: E2E Tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
e2e-tests:
11+
name: E2E Tests with Bruno
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 30
14+
15+
steps:
16+
- name: Checkout example service
17+
uses: actions/checkout@v4
18+
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'temurin'
24+
25+
- name: Setup Gradle
26+
uses: gradle/actions/setup-gradle@v4
27+
28+
- name: Build service
29+
run: ./gradlew build -x test
30+
31+
- name: Start service in background
32+
run: |
33+
./gradlew bootRun &
34+
echo $! > service.pid
35+
echo "Service started with PID $(cat service.pid)"
36+
37+
- name: Checkout oicana repository (for Bruno tests)
38+
uses: actions/checkout@v4
39+
with:
40+
repository: oicana/oicana
41+
path: oicana
42+
43+
- name: Setup Node.js for Bruno CLI
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: '20'
47+
48+
- name: Install Bruno CLI
49+
run: npm install -g @usebruno/cli
50+
51+
- name: Wait for service to be ready
52+
run: |
53+
echo "Waiting for service on port 3005..."
54+
timeout=120
55+
elapsed=0
56+
while ! curl -f http://localhost:3005/templates 2>/dev/null; do
57+
if [ $elapsed -ge $timeout ]; then
58+
echo "Service did not start within ${timeout} seconds"
59+
if [ -f service.pid ]; then
60+
echo "Service PID: $(cat service.pid)"
61+
ps aux | grep $(cat service.pid) || echo "Service process not found"
62+
fi
63+
exit 1
64+
fi
65+
echo "Waiting... (${elapsed}s/${timeout}s)"
66+
sleep 2
67+
elapsed=$((elapsed + 2))
68+
done
69+
echo "Service is ready!"
70+
71+
- name: Run Bruno E2E tests
72+
working-directory: oicana/e2e-tests/bruno
73+
run: bru run --env spring-boot --reporter-html results.html
74+
75+
- name: Upload test results
76+
if: always()
77+
uses: actions/upload-artifact@v4
78+
with:
79+
name: test-results
80+
path: oicana/e2e-tests/bruno/results.html
81+
retention-days: 30
82+
83+
- name: Stop service
84+
if: always()
85+
run: |
86+
if [ -f service.pid ]; then
87+
PID=$(cat service.pid)
88+
echo "Stopping service with PID $PID"
89+
kill $PID || true
90+
sleep 5
91+
kill -9 $PID 2>/dev/null || true
92+
fi

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.gradle/
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
35 KB
Binary file not shown.

build.gradle.kts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
plugins {
2+
java
3+
id("org.springframework.boot") version "3.4.3"
4+
id("io.spring.dependency-management") version "1.1.7"
5+
}
6+
7+
group = "com.oicana"
8+
version = "1.0.0"
9+
10+
java {
11+
sourceCompatibility = JavaVersion.VERSION_17
12+
targetCompatibility = JavaVersion.VERSION_17
13+
}
14+
15+
repositories {
16+
mavenLocal()
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
implementation("org.springframework.boot:spring-boot-starter-web")
22+
implementation("com.oicana:oicana:0.1.0-alpha.1")
23+
}

gradle/wrapper/gradle-wrapper.jar

45.1 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
6+
zipStoreBase=GRADLE_USER_HOME
7+
zipStorePath=wrapper/dists

gradlew

Lines changed: 248 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)