Skip to content

Proxy test #2172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/test_proxy.yaml
Original file line number Diff line number Diff line change
@@ -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 libbrotli-dev libzstd-dev netcat-openbsd

- name: Run proxy tests
run: |
cd test && make proxy
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ ipch
*.pyc
.*
!/.gitattributes
!/.travis.yml
!/.github
12 changes: 10 additions & 2 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,20 @@ all : test test_split
proxy : test_proxy
@echo "Starting proxy server..."
cd proxy && \
docker-compose up -d
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=$$?; \
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
Expand Down
Loading