Skip to content

Commit

Permalink
try this instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jakekaplan committed Dec 11, 2024
1 parent 4852b65 commit 87ec4c4
Showing 1 changed file with 56 additions and 68 deletions.
124 changes: 56 additions & 68 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,71 +144,59 @@ jobs:
docker run prefect-server-new-sqlite sh -c "prefect server database downgrade --yes -r base && prefect server database upgrade --yes"
proxy-tests:
name: Proxy Tests
runs-on: ubuntu-latest

services:
server:
image: prefecthq/prefect:2-latest
env:
PREFECT_API_URL: http://127.0.0.1:4200/api
PREFECT_SERVER_LOGGING_LEVEL: DEBUG
ports:
- "4200:4200"

proxy:
image: ubuntu/squid
ports:
- "3128:3128"
volumes:
- ${{ github.workspace }}/squid.conf:/etc/squid/squid.conf

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: UV Cache
uses: actions/cache@v4
id: cache-uv
with:
path: ~/.cache/uv
key: uvcache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements-client.txt', 'requirements.txt', 'requirements-dev.txt') }}

- name: Install python packages
run: |
python -m pip install -U uv
uv pip install --upgrade --system .
- name: Create Squid config
run: |
cat > squid.conf << 'EOL'
http_port 3128
acl SSL_ports port 443 4200
acl Safe_ports port 80 443 4200
acl CONNECT method CONNECT
http_access allow all
EOL
- name: Wait for server
run: |
./scripts/wait-for-server.py
- name: Run integration flows
env:
PREFECT_API_URL: http://127.0.0.1:4200/api
HTTP_PROXY: http://localhost:3128
HTTPS_PROXY: http://localhost:3128
run: |
./scripts/run-integration-flows.py flows/
- name: Show logs
if: always()
run: |
echo "=== Proxy Logs ==="
docker logs ${{ job.services.proxy.id }} || echo "No proxy logs available"
echo "=== Server Logs ==="
docker logs ${{ job.services.server.id }} || echo "No server logs available"
name: Proxy Tests
runs-on: ubuntu-latest

services:
server:
image: prefecthq/prefect:2-latest
env:
PREFECT_API_URL: http://127.0.0.1:4200/api
PREFECT_SERVER_LOGGING_LEVEL: DEBUG
ports:
- "4200:4200"

proxy:
image: ubuntu/squid
ports:
- "3128:3128"
command: sh -c 'echo "http_port 3128\nacl SSL_ports port 443 4200\nacl Safe_ports port 80 443 4200\nacl CONNECT method CONNECT\nhttp_access allow all" > /etc/squid/squid.conf && squid -N'

steps:
- uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: UV Cache
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: uvcache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('requirements-client.txt', 'requirements.txt', 'requirements-dev.txt') }}

- name: Install python packages
run: |
python -m pip install -U uv
uv pip install --upgrade --system .
- name: Wait for server
run: |
./scripts/wait-for-server.py
- name: Run integration flows
env:
PREFECT_API_URL: http://127.0.0.1:4200/api
HTTP_PROXY: http://localhost:3128
HTTPS_PROXY: http://localhost:3128
run: |
./scripts/run-integration-flows.py flows/
- name: Show logs
if: always()
run: |
echo "=== Proxy Logs ==="
docker logs ${{ job.services.proxy.id }} || echo "No proxy logs available"
echo "=== Server Logs ==="
docker logs ${{ job.services.server.id }} || echo "No server logs available"

0 comments on commit 87ec4c4

Please sign in to comment.