-
Notifications
You must be signed in to change notification settings - Fork 11
121 lines (100 loc) · 3.63 KB
/
action-test.yml
File metadata and controls
121 lines (100 loc) · 3.63 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Action Self-Test
# Runs the AppClaw GitHub Action against itself to validate it works end-to-end.
# Triggered when the action definition or its test workflow changes, and on
# manual dispatch.
on:
push:
branches: [main]
paths:
- 'action.yml'
- '.github/workflows/action-test.yml'
- 'flows/**'
workflow_dispatch:
inputs:
platform:
description: 'Platform to test'
required: false
default: 'android'
type: choice
options: [android, ios]
flow:
description: 'Flow file to run'
required: false
default: 'flows/youtube.yaml'
concurrency:
group: action-test-${{ github.ref }}
cancel-in-progress: true
jobs:
# ── Android — YAML flow ────────────────────────────────────────────────────
android-flow:
name: Android — YAML flow
runs-on: ubuntu-latest
if: github.event.inputs.platform == '' || github.event.inputs.platform == 'android'
steps:
- uses: actions/checkout@v4
# Use the local action definition (same repo, same commit)
- uses: ./
id: run
with:
flow: ${{ github.event.inputs.flow || 'flows/youtube.yaml' }}
platform: android
provider: gemini
api-key: ${{ secrets.LLM_API_KEY }}
report-name: action-test-android-flow-${{ github.run_id }}
- name: Print report path
if: always()
run: echo "Report → ${{ steps.run.outputs.report-path }}"
# ── Android — natural language goal ───────────────────────────────────────
android-goal:
name: Android — natural language goal
runs-on: ubuntu-latest
if: github.event.inputs.platform == '' || github.event.inputs.platform == 'android'
steps:
- uses: actions/checkout@v4
- uses: ./
id: run
with:
goal: 'Open YouTube app and verify the home feed is visible'
platform: android
provider: gemini
api-key: ${{ secrets.LLM_API_KEY }}
max-steps: 10
report-name: action-test-android-goal-${{ github.run_id }}
- name: Print report path
if: always()
run: echo "Report → ${{ steps.run.outputs.report-path }}"
# ── iOS — YAML flow (macOS runner) ─────────────────────────────────────────
ios-flow:
name: iOS — YAML flow
runs-on: macos-14
if: github.event.inputs.platform == 'ios'
steps:
- uses: actions/checkout@v4
- uses: ./
id: run
with:
flow: ${{ github.event.inputs.flow || 'flows/youtube.yaml' }}
platform: ios
provider: gemini
api-key: ${{ secrets.LLM_API_KEY }}
report-name: action-test-ios-flow-${{ github.run_id }}
- name: Print report path
if: always()
run: echo "Report → ${{ steps.run.outputs.report-path }}"
# ── Validate: action installs AppClaw correctly (no device needed) ─────────
validate-install:
name: Validate — AppClaw installs correctly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install AppClaw (latest)
run: npm install -g appclaw@latest
- name: Verify binary is available
run: appclaw --help
- name: Verify build compiles
run: |
npm ci
npm run build