This commit is contained in:
+16
-13
@@ -32,9 +32,15 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-maven-
|
${{ runner.os }}-maven-
|
||||||
|
|
||||||
- uses: gerlero/apt-install@v1
|
- name: Install dependencies with Proxy
|
||||||
with:
|
env:
|
||||||
packages: openjdk-25-jdk-headless docker.io
|
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
|
- name: Build and Test all modules
|
||||||
env:
|
env:
|
||||||
@@ -48,6 +54,9 @@ jobs:
|
|||||||
POSTGRES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres-it)
|
POSTGRES_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' postgres-it)
|
||||||
REDIS_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' redis-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
|
./scripts/gen-it.sh
|
||||||
|
|
||||||
./mvnw -B verify \
|
./mvnw -B verify \
|
||||||
@@ -56,12 +65,6 @@ jobs:
|
|||||||
-Dquarkus.test.env.QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://postgres-it:5432/postgres \
|
-Dquarkus.test.env.QUARKUS_DATASOURCE_JDBC_URL=jdbc:postgresql://postgres-it:5432/postgres \
|
||||||
-Dquarkus.redis.hosts=redis://${REDIS_IP}:6379
|
-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
|
- name: Debug Quarkus Integration Test Logs
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
@@ -75,8 +78,8 @@ jobs:
|
|||||||
echo "--- DOCKER NETWORK INSPECT ---"
|
echo "--- DOCKER NETWORK INSPECT ---"
|
||||||
docker network inspect ${DOCKER_NET} || true
|
docker network inspect ${DOCKER_NET} || true
|
||||||
|
|
||||||
- name: Test Summary
|
- name: Clean up Docker containers
|
||||||
uses: test-summary/action@v2
|
|
||||||
with:
|
|
||||||
paths: "**/TEST-*.xml"
|
|
||||||
if: always()
|
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