From 1dbda9fb63c2977432544cde4a24081ff243bb81 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 6 Jul 2025 21:32:20 -0400 Subject: [PATCH 1/6] Add proxy test on CI --- .github/workflows/test_proxy.yaml | 20 ++++++++++++++++++++ .gitignore | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test_proxy.yaml diff --git a/.github/workflows/test_proxy.yaml b/.github/workflows/test_proxy.yaml new file mode 100644 index 0000000000..bf10eb0934 --- /dev/null +++ b/.github/workflows/test_proxy.yaml @@ -0,0 +1,20 @@ +name: Proxy Test + +on: [push, pull_request] + +jobs: + test-proxy: + runs-on: ubuntu-latest + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + + steps: + - uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev + + - name: Run proxy tests + run: | + cd test && make proxy \ No newline at end of file diff --git a/.gitignore b/.gitignore index 1ae8acf708..a4cacc7732 100644 --- a/.gitignore +++ b/.gitignore @@ -42,4 +42,4 @@ ipch *.pyc .* !/.gitattributes -!/.travis.yml +!/.github From 619f2ae351f226259f052de662e7b90881b529f5 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 6 Jul 2025 21:36:46 -0400 Subject: [PATCH 2/6] Add Brotli and Zstd dev packages to proxy test workflow --- .github/workflows/test_proxy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_proxy.yaml b/.github/workflows/test_proxy.yaml index bf10eb0934..0cbe3b5701 100644 --- a/.github/workflows/test_proxy.yaml +++ b/.github/workflows/test_proxy.yaml @@ -13,7 +13,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev + sudo apt-get install -y build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev libbrotli-dev libzstd-dev - name: Run proxy tests run: | From f5d81fffe1da4c65c0dd816f94728c66f0e53ca6 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 6 Jul 2025 21:42:28 -0400 Subject: [PATCH 3/6] Fix Docker Compose command for GitHub Actions compatibility --- test/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Makefile b/test/Makefile index 56cfbc1083..7f585400ba 100644 --- a/test/Makefile +++ b/test/Makefile @@ -53,12 +53,12 @@ all : test test_split proxy : test_proxy @echo "Starting proxy server..." cd proxy && \ - docker-compose up -d + docker compose up -d @echo "Running proxy tests..." ./test_proxy; \ exit_code=$$?; \ echo "Stopping proxy server..."; \ - docker-compose down; \ + cd proxy && docker compose down; \ exit $$exit_code test : test.cc include_httplib.cc ../httplib.h Makefile cert.pem From cedb150c3c453522ac5766c693b1bcd73201226b Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 6 Jul 2025 21:49:20 -0400 Subject: [PATCH 4/6] Add proxy readiness check and netcat dependency --- .github/workflows/test_proxy.yaml | 2 +- test/Makefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_proxy.yaml b/.github/workflows/test_proxy.yaml index 0cbe3b5701..c20409ef8c 100644 --- a/.github/workflows/test_proxy.yaml +++ b/.github/workflows/test_proxy.yaml @@ -13,7 +13,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev libbrotli-dev libzstd-dev + sudo apt-get install -y build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev libbrotli-dev libzstd-dev netcat - name: Run proxy tests run: | diff --git a/test/Makefile b/test/Makefile index 7f585400ba..6e9ab86481 100644 --- a/test/Makefile +++ b/test/Makefile @@ -54,6 +54,8 @@ proxy : test_proxy @echo "Starting proxy server..." cd proxy && \ docker compose up -d + @echo "Waiting for proxy to be ready..." + @until nc -z localhost 3128 && nc -z localhost 3129; do sleep 1; done @echo "Running proxy tests..." ./test_proxy; \ exit_code=$$?; \ From 8d23e3a24bde1179f9d1c189bffe363f46e96e24 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 6 Jul 2025 21:52:10 -0400 Subject: [PATCH 5/6] Use netcat-openbsd instead of virtual netcat package --- .github/workflows/test_proxy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_proxy.yaml b/.github/workflows/test_proxy.yaml index c20409ef8c..571dc96ac6 100644 --- a/.github/workflows/test_proxy.yaml +++ b/.github/workflows/test_proxy.yaml @@ -13,7 +13,7 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get install -y build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev libbrotli-dev libzstd-dev netcat + sudo apt-get install -y build-essential libssl-dev zlib1g-dev libcurl4-openssl-dev libbrotli-dev libzstd-dev netcat-openbsd - name: Run proxy tests run: | From 12c61e497888c167c3c9e7bdb0efba4c3f55e3a2 Mon Sep 17 00:00:00 2001 From: yhirose Date: Sun, 6 Jul 2025 21:56:33 -0400 Subject: [PATCH 6/6] Add proxy startup delay and debug logging --- test/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Makefile b/test/Makefile index 6e9ab86481..900cb56ffc 100644 --- a/test/Makefile +++ b/test/Makefile @@ -56,6 +56,12 @@ proxy : test_proxy docker compose up -d @echo "Waiting for proxy to be ready..." @until nc -z localhost 3128 && nc -z localhost 3129; do sleep 1; done + @echo "Proxy servers are ready, waiting additional 5 seconds for full startup..." + @sleep 5 + @echo "Checking proxy server status..." + @cd proxy && docker compose ps + @echo "Checking proxy server logs..." + @cd proxy && docker compose logs --tail=20 @echo "Running proxy tests..." ./test_proxy; \ exit_code=$$?; \