ci(e2e): Add e2e ci
This commit is contained in:
parent
1a278fdcea
commit
ba670223de
4 changed files with 64 additions and 0 deletions
50
.bin/e2e.sh
Normal file
50
.bin/e2e.sh
Normal 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
|
||||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
|
@ -3,6 +3,13 @@ name: Polyglot CI
|
|||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- '**.java'
|
||||
- '**.go'
|
||||
- '.justfile'
|
||||
- '**.js'
|
||||
- '**.svelte'
|
||||
- '**.css'
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -50,3 +50,6 @@ drone-black-box/drone_black_box.db*
|
|||
|
||||
*.out
|
||||
*.html
|
||||
|
||||
drone_black_box.db*
|
||||
app
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ all:
|
|||
@just format
|
||||
@just static-analysis
|
||||
@just test
|
||||
@just e2e
|
||||
|
||||
format:
|
||||
cd ./drone-black-box && go fmt
|
||||
|
|
@ -17,3 +18,6 @@ test:
|
|||
rm ./drone-black-box/coverage.out
|
||||
# Java
|
||||
cd ./ilp-rest-service/ && ./gradlew check
|
||||
|
||||
e2e:
|
||||
bash .bin/e2e.sh
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue