Skip to content

feat(cli): add --enable-chroot for transparent host binary execution #1

feat(cli): add --enable-chroot for transparent host binary execution

feat(cli): add --enable-chroot for transparent host binary execution #1

Workflow file for this run

name: Chroot Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
test-chroot-languages:
name: Test Chroot Language Support
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22'
cache: 'npm'
- name: Setup Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: '3.12'
- name: Setup Go
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version: '1.22'
- name: Verify host tools are available
run: |
echo "=== Verifying host tools ==="
echo "Node.js: $(node --version)"
echo "npm: $(npm --version)"
echo "Python: $(python3 --version)"
echo "pip: $(pip3 --version)"
echo "Go: $(go version)"
echo "Git: $(git --version)"
echo "curl: $(curl --version | head -1)"
- 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/githubnext/gh-aw-firewall/squid:latest containers/squid/
docker build -t ghcr.io/githubnext/gh-aw-firewall/agent:latest containers/agent/
- name: Pre-test cleanup
run: |
echo "=== Pre-test cleanup ==="
./scripts/ci/cleanup.sh || true
- name: Run chroot language tests
run: |
echo "=== Running chroot language tests ==="
npm run test:integration -- --testPathPattern="chroot-languages" --verbose
env:
# Increase Jest timeout for CI environment
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
cat /tmp/awf-*/squid-logs/access.log 2>/dev/null || true