diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml index 575edc5e5ad9d..11b219f07b271 100644 --- a/.github/workflows/integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -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" \ No newline at end of file