This commit is contained in:
+16
-13
@@ -32,9 +32,15 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- uses: gerlero/apt-install@v1
|
||||
with:
|
||||
packages: openjdk-25-jdk-headless docker.io
|
||||
- name: Install dependencies with Proxy
|
||||
env:
|
||||
http_proxy: "http://host.docker.internal:3142"
|
||||
https_proxy: "http://host.docker.internal:3142"
|
||||
run: |
|
||||
# Kiểm tra proxy có hoạt động không
|
||||
echo "Acquire::http::Proxy \"$http_proxy\";" > /etc/apt/apt.conf.d/80proxy
|
||||
apt-get update
|
||||
apt-get install -y openjdk-25-jdk-headless docker.io
|
||||
|
||||
- name: Build and Test all modules
|
||||
env:
|
||||
@@ -48,6 +54,9 @@ jobs:
|
||||
POSTGRES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres-it)
|
||||
REDIS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' redis-it)
|
||||
|
||||
echo "PostgreSQL IP: ${POSTGRES_IP}"
|
||||
echo "Redis IP: ${REDIS_IP}"
|
||||
|
||||
./scripts/gen-it.sh
|
||||
|
||||
./mvnw -B verify \
|
||||
@@ -56,12 +65,6 @@ jobs:
|
||||
-Dquarkus.test.env.QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://postgres-it:5432/postgres \
|
||||
-Dquarkus.redis.hosts=redis://${REDIS_IP}:6379
|
||||
|
||||
- name: Clean up Docker containers
|
||||
if: always()
|
||||
run: |
|
||||
docker ps -a --filter network=${DOCKER_NET} -q | xargs -r docker rm -f
|
||||
docker network rm ${DOCKER_NET}
|
||||
|
||||
- name: Debug Quarkus Integration Test Logs
|
||||
if: failure()
|
||||
run: |
|
||||
@@ -75,8 +78,8 @@ jobs:
|
||||
echo "--- DOCKER NETWORK INSPECT ---"
|
||||
docker network inspect ${DOCKER_NET} || true
|
||||
|
||||
- name: Test Summary
|
||||
uses: test-summary/action@v2
|
||||
with:
|
||||
paths: "**/TEST-*.xml"
|
||||
- name: Clean up Docker containers
|
||||
if: always()
|
||||
run: |
|
||||
docker ps -a --filter network=${DOCKER_NET} -q | xargs -r docker rm -f
|
||||
docker network rm ${DOCKER_NET}
|
||||
|
||||
Reference in New Issue
Block a user