Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions .github/workflows/layer3-branch-test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
name: AppClaw Action — Branch Test (Layer 3)

# Layer 3 test — validates the action as an external caller would use it.
# References the branch by name (not ./github-action) so it exercises the
# full public action resolution path before the branch is tagged and published.
#
# Triggers:
# - Every pull_request (android YAML flow by default)
# - Actions tab → "Run workflow" for manual runs with custom inputs
# Required secret: LLM_API_KEY
name: AppClaw Action

on:
pull_request:
Expand All @@ -16,7 +7,7 @@ on:
flow:
description: 'Path to YAML flow file in your repo'
required: false
default: 'flows/youtube.yaml'
default: 'flows/wdio.yaml'
goal:
description: 'Natural language goal (leave empty to use flow instead)'
required: false
Expand All @@ -39,12 +30,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: AppiumTestDistribution/AppClaw/github-action@${{ github.head_ref || 'main' }}
- uses: ./github-action
id: run
with:
flow: ${{ inputs.flow || 'flows/youtube.yaml' }}
use-local-build: 'true'
flow: ${{ inputs.flow || 'flows/wdio.yaml' }}
platform: android
provider: gemini
agent-mode: vision
api-key: ${{ secrets.LLM_API_KEY }}
report-name: layer3-android-flow-${{ github.run_id }}

Expand All @@ -62,12 +55,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: AppiumTestDistribution/AppClaw/github-action@${{ github.head_ref || 'main' }}
- uses: ./github-action
id: run
with:
use-local-build: 'true'
goal: ${{ inputs.goal }}
platform: android
provider: gemini
agent-mode: vision
api-key: ${{ secrets.LLM_API_KEY }}
report-name: layer3-android-goal-${{ github.run_id }}

Expand All @@ -80,17 +75,19 @@ jobs:
ios-flow:
name: iOS — YAML flow
runs-on: macos-14
if: github.event_name == 'workflow_dispatch' && inputs.platform == 'ios'
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.platform == 'ios')

steps:
- uses: actions/checkout@v4

- uses: AppiumTestDistribution/AppClaw/github-action@${{ github.head_ref || 'main' }}
- uses: ./github-action
id: run
with:
flow: ${{ inputs.flow || 'flows/youtube.yaml' }}
use-local-build: 'true'
flow: ${{ inputs.flow || 'flows/wdio.yaml' }}
platform: ios
provider: gemini
agent-mode: vision
api-key: ${{ secrets.LLM_API_KEY }}
report-name: layer3-ios-flow-${{ github.run_id }}

Expand Down
7 changes: 7 additions & 0 deletions flows/ios.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
platform: ios
---
steps:
- open contacts
- click on plus icon
- wait for Add photo text
- done
15 changes: 15 additions & 0 deletions flows/wdio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
app:
android: https://github.com/webdriverio/native-demo-app/releases/download/v2.2.0/android.wdio.native.app.v2.2.0.apk
ios: https://github.com/webdriverio/native-demo-app/releases/download/v2.2.0/ios.simulator.wdio.native.app.v2.2.0.zip
---
steps:
- open wdio app
- wait for Login
- click on Login
- enter appclaw@gmail.com in the username field
- enter appclaw123 in the password field
- go back
- click on login button
- wait for 2 seconds
- assert You are logged in
- done
25 changes: 23 additions & 2 deletions github-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ inputs:
description: 'Emulator system image target: default or google_apis'
required: false
default: 'default'
android-arch:
description: 'Emulator CPU architecture: x86_64 or x86. Default: x86_64 (required for API 31+)'
required: false
default: 'x86_64'

# ── LambdaTest cloud ─────────────────────────────────────────────────────────
cloud-provider:
Expand Down Expand Up @@ -107,6 +111,10 @@ inputs:
description: 'AppClaw npm package version to install. Default: latest'
required: false
default: 'latest'
use-local-build:
description: 'Build and install AppClaw from the checked-out source instead of npm. Use in PRs to test local changes.'
required: false
default: 'false'

# ── Outputs ───────────────────────────────────────────────────────────────────

Expand Down Expand Up @@ -157,11 +165,22 @@ runs:
with:
node-version: '22'

- name: Install AppClaw
- name: Install AppClaw (from npm)
if: inputs.use-local-build == 'false'
shell: bash
run: |
echo "::group::Installing appclaw@${{ inputs.appclaw-version }}"
npm install -g appclaw@${{ inputs.appclaw-version }}
npm install -g appclaw@${{ inputs.appclaw-version }} mjpeg-consumer
echo "::endgroup::"

- name: Install AppClaw (from local source)
if: inputs.use-local-build == 'true'
shell: bash
run: |
echo "::group::Building and installing AppClaw from local source"
npm install --no-package-lock
npm run build
npm install -g . mjpeg-consumer
echo "::endgroup::"

# ── LambdaTest — YAML flow ────────────────────────────────────────────────
Expand Down Expand Up @@ -231,6 +250,7 @@ runs:
PLATFORM: android
with:
api-level: ${{ inputs.android-api-level }}
arch: ${{ inputs.android-arch }}
profile: ${{ inputs.android-profile }}
target: ${{ inputs.android-target }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
Expand All @@ -252,6 +272,7 @@ runs:
PLATFORM: android
with:
api-level: ${{ inputs.android-api-level }}
arch: ${{ inputs.android-arch }}
profile: ${{ inputs.android-profile }}
target: ${{ inputs.android-target }}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
Expand Down
Loading
Loading