Redesign cli-proxy: connect to external DIFC proxy started by compiler #726
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Integration Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - '.github/workflows/release.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-domain: | |
| name: Domain Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Build local containers | |
| run: | | |
| echo "=== Building local containers ===" | |
| docker build -t ghcr.io/github/gh-aw-firewall/squid:latest containers/squid/ | |
| docker build -t ghcr.io/github/gh-aw-firewall/agent:latest containers/agent/ | |
| - name: Pre-test cleanup | |
| run: | | |
| echo "=== Pre-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Run domain tests | |
| run: | | |
| echo "=== Running domain tests ===" | |
| npm run test:integration -- \ | |
| --testPathPatterns="(blocked-domains|dns-servers|empty-domains|wildcard-patterns)" \ | |
| --verbose | |
| env: | |
| JEST_TIMEOUT: 180000 | |
| - name: Post-test cleanup | |
| if: always() | |
| run: | | |
| echo "=== Post-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Collecting failure logs ===" | |
| docker ps -a || true | |
| docker logs awf-squid 2>&1 || true | |
| docker logs awf-agent 2>&1 || true | |
| ls -la /tmp/awf-* 2>/dev/null || true | |
| sudo cat /tmp/awf-*/squid-logs/access.log 2>/dev/null || true | |
| test-network: | |
| name: Network Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Build local containers | |
| run: | | |
| echo "=== Building local containers ===" | |
| docker build -t ghcr.io/github/gh-aw-firewall/squid:latest containers/squid/ | |
| docker build -t ghcr.io/github/gh-aw-firewall/agent:latest containers/agent/ | |
| - name: Pre-test cleanup | |
| run: | | |
| echo "=== Pre-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Run network tests | |
| run: | | |
| echo "=== Running network tests ===" | |
| npm run test:integration -- \ | |
| --testPathPatterns="(ipv6|localhost-access|network-security)" \ | |
| --verbose | |
| env: | |
| JEST_TIMEOUT: 180000 | |
| - name: Post-test cleanup | |
| if: always() | |
| run: | | |
| echo "=== Post-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Collecting failure logs ===" | |
| docker ps -a || true | |
| docker logs awf-squid 2>&1 || true | |
| docker logs awf-agent 2>&1 || true | |
| ls -la /tmp/awf-* 2>/dev/null || true | |
| sudo cat /tmp/awf-*/squid-logs/access.log 2>/dev/null || true | |
| test-protocol-security: | |
| name: Protocol & Security Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Build local containers | |
| run: | | |
| echo "=== Building local containers ===" | |
| docker build -t ghcr.io/github/gh-aw-firewall/squid:latest containers/squid/ | |
| docker build -t ghcr.io/github/gh-aw-firewall/agent:latest containers/agent/ | |
| - name: Pre-test cleanup | |
| run: | | |
| echo "=== Pre-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Run protocol & security tests | |
| run: | | |
| echo "=== Running protocol & security tests ===" | |
| npm run test:integration -- \ | |
| --testPathPatterns="(protocol-support|credential-hiding|one-shot-tokens|token-unset|git-operations)" \ | |
| --verbose | |
| env: | |
| JEST_TIMEOUT: 180000 | |
| - name: Post-test cleanup | |
| if: always() | |
| run: | | |
| echo "=== Post-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Collecting failure logs ===" | |
| docker ps -a || true | |
| docker logs awf-squid 2>&1 || true | |
| docker logs awf-agent 2>&1 || true | |
| ls -la /tmp/awf-* 2>/dev/null || true | |
| sudo cat /tmp/awf-*/squid-logs/access.log 2>/dev/null || true | |
| test-container-ops: | |
| name: Container & Ops Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Build local containers | |
| run: | | |
| echo "=== Building local containers ===" | |
| docker build -t ghcr.io/github/gh-aw-firewall/squid:latest containers/squid/ | |
| docker build -t ghcr.io/github/gh-aw-firewall/agent:latest containers/agent/ | |
| - name: Pre-test cleanup | |
| run: | | |
| echo "=== Pre-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Run container & ops tests | |
| run: | | |
| echo "=== Running container & ops tests ===" | |
| npm run test:integration -- \ | |
| --testPathPatterns="(container-workdir|environment-variables|error-handling|exit-code-propagation|log-commands|no-docker|volume-mounts|skip-pull)" \ | |
| --verbose | |
| env: | |
| JEST_TIMEOUT: 180000 | |
| - name: Post-test cleanup | |
| if: always() | |
| run: | | |
| echo "=== Post-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Collecting failure logs ===" | |
| docker ps -a || true | |
| docker logs awf-squid 2>&1 || true | |
| docker logs awf-agent 2>&1 || true | |
| ls -la /tmp/awf-* 2>/dev/null || true | |
| sudo cat /tmp/awf-*/squid-logs/access.log 2>/dev/null || true | |
| test-api-proxy: | |
| name: API Proxy Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build project | |
| run: npm run build | |
| - name: Build local containers | |
| run: | | |
| echo "=== Building local containers ===" | |
| docker build -t ghcr.io/github/gh-aw-firewall/squid:latest containers/squid/ | |
| docker build -t ghcr.io/github/gh-aw-firewall/agent:latest containers/agent/ | |
| - name: Pre-test cleanup | |
| run: | | |
| echo "=== Pre-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Run API proxy tests | |
| run: | | |
| echo "=== Running API proxy tests ===" | |
| npm run test:integration -- \ | |
| --testPathPatterns="api-proxy" \ | |
| --verbose | |
| env: | |
| JEST_TIMEOUT: 180000 | |
| - name: Post-test cleanup | |
| if: always() | |
| run: | | |
| echo "=== Post-test cleanup ===" | |
| ./scripts/ci/cleanup.sh || true | |
| - name: Collect logs on failure | |
| if: failure() | |
| run: | | |
| echo "=== Collecting failure logs ===" | |
| docker ps -a || true | |
| docker logs awf-squid 2>&1 || true | |
| docker logs awf-agent 2>&1 || true | |
| ls -la /tmp/awf-* 2>/dev/null || true | |
| sudo cat /tmp/awf-*/squid-logs/access.log 2>/dev/null || true |