-
Notifications
You must be signed in to change notification settings - Fork 58
93 lines (86 loc) · 2.76 KB
/
e2e-asset-execution.yml
File metadata and controls
93 lines (86 loc) · 2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: E2E Asset Execution Test 🧪
on:
workflow_dispatch: ~
push:
branches: [ main ]
pull_request:
branches: [ main ]
merge_group:
jobs:
e2e_asset_execution_test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- name: ⚡ Setup Golang
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.81.0'
default: true
profile: minimal
components: rustfmt, clippy
- name: ⚡ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tavern/internal/www/package-lock.json
- name: 📦 Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgbm-dev libx11-dev libssl-dev protobuf-compiler pkg-config libclang-dev libxcb1-dev libxrandr-dev libdbus-1-dev libpipewire-0.3-dev libwayland-dev libegl-dev
- name: 🔨 Build Tavern
run: |
go mod download
go build -v -o tavern_bin ./tavern
- name: 🚀 Run Tavern
env:
HTTP_LISTEN_ADDR: ":8000"
run: |
./tavern_bin > tavern.log 2>&1 &
echo "Waiting for Tavern to start..."
# Wait for port 8000
timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' localhost 8000
- name: 🤖 Run Agent
working-directory: implants/imix
env:
IMIX_CALLBACK_URI: "http://localhost:8000"
IMIX_CALLBACK_INTERVAL: 1
run: |
# Fetch the pubkey and verify it's not empty
PUBKEY=$(curl -s http://localhost:8000/status | jq -r .Pubkey)
if [ -z "$PUBKEY" ] || [ "$PUBKEY" == "null" ]; then
echo "Error: Could not fetch Pubkey from Tavern"
exit 1
fi
export IMIX_SERVER_PUBKEY=$PUBKEY
echo "Got pubkey: $IMIX_SERVER_PUBKEY"
echo "Building imix..."
cargo build --bin imix --target-dir ./build
# Run agent and pipe logs to a file
./build/debug/imix > agent.log 2>&1 &
# Give the agent a moment to perform the initial handshake
echo "Agent started. Waiting for initial callback..."
sleep 5
- name: 🎭 Install Playwright
working-directory: tests/e2e
run: |
npm ci
npx playwright install --with-deps chromium
- name: 🧪 Run E2E Tests
working-directory: tests/e2e
run: |
npx playwright test tests/asset_execution.spec.ts
- name: 📂 Upload Service Logs
if: always() # Runs even if tests fail
uses: actions/upload-artifact@v4
with:
name: e2e-logs
path: |
tavern.log
implants/imix/agent.log