ci(e2e): Add e2e ci

This commit is contained in:
js0ny 2026-01-22 08:39:11 +00:00
parent 1a278fdcea
commit ba670223de
4 changed files with 64 additions and 0 deletions

50
.bin/e2e.sh Normal file
View file

@ -0,0 +1,50 @@
#!/usr/bin/env bash
set -e
echo "[INFO] Starting Go Backend..."
cd drone-black-box && go build -o app main.go
cd ..
./drone-black-box/app &
GO_PID=$!
echo " Go PID: $GO_PID"
echo "[INFO] Starting Java Backend..."
cd ilp-rest-service
./gradlew bootRun &
JAVA_PID=$!
echo " Java PID: $JAVA_PID"
cd ..
cleanup() {
echo "[INFO] Stopping services..."
kill $GO_PID || true
kill $JAVA_PID || true
}
trap cleanup EXIT
echo "[INFO] Waiting for services to be ready..."
for i in {1..30}; do
if curl -s http://localhost:8080/actuator/health > /dev/null; then
echo "[INFO] Java is UP!"
break
fi
echo "[DEBUG] Waiting for Java..."
sleep 2
done
echo "[INFO] Running Bruno E2E Collection..."
cd ./ilp-rest-service/ilp-cw-api
bru run
echo "[INFO] E2E Tests Passed!"
cleanup

View file

@ -3,6 +3,13 @@ name: Polyglot CI
on: on:
push: push:
branches: [ "main" ] branches: [ "main" ]
paths:
- '**.java'
- '**.go'
- '.justfile'
- '**.js'
- '**.svelte'
- '**.css'
pull_request: pull_request:
branches: [ "main" ] branches: [ "main" ]

3
.gitignore vendored
View file

@ -50,3 +50,6 @@ drone-black-box/drone_black_box.db*
*.out *.out
*.html *.html
drone_black_box.db*
app

View file

@ -2,6 +2,7 @@ all:
@just format @just format
@just static-analysis @just static-analysis
@just test @just test
@just e2e
format: format:
cd ./drone-black-box && go fmt cd ./drone-black-box && go fmt
@ -17,3 +18,6 @@ test:
rm ./drone-black-box/coverage.out rm ./drone-black-box/coverage.out
# Java # Java
cd ./ilp-rest-service/ && ./gradlew check cd ./ilp-rest-service/ && ./gradlew check
e2e:
bash .bin/e2e.sh