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
121 changes: 121 additions & 0 deletions .github/workflows/action-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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:
- 'github-action/**'
- '.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: ./github-action
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: ./github-action
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: ./github-action
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
96 changes: 96 additions & 0 deletions .github/workflows/layer3-branch-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
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.
#
# Trigger: Actions tab → "AppClaw Action — Branch Test (Layer 3)" → Run workflow
# Required secret: LLM_API_KEY

on:
push:
branches: [feat/parallel-testing-video-recording]
paths: ['github-action/**']
workflow_dispatch:
inputs:
flow:
description: 'Path to YAML flow file in your repo'
required: false
default: 'flows/youtube.yaml'
goal:
description: 'Natural language goal (leave empty to use flow instead)'
required: false
default: ''
platform:
description: 'Platform to test'
required: false
default: 'android'
type: choice
options: [android, ios]

jobs:
# ── Test 1: YAML flow on Android ────────────────────────────────────────────
android-flow:
name: Android — YAML flow
runs-on: ubuntu-latest
if: inputs.platform == 'android' && inputs.goal == ''

steps:
- uses: actions/checkout@v4

- uses: AppiumTestDistribution/AppClaw/github-action@feat/parallel-testing-video-recording
id: run
with:
flow: ${{ inputs.flow }}
platform: android
provider: gemini
api-key: ${{ secrets.LLM_API_KEY }}
report-name: layer3-android-flow-${{ github.run_id }}

- name: Show report path
if: always()
run: echo "Report → ${{ steps.run.outputs.report-path }}"

# ── Test 2: Natural language goal on Android ─────────────────────────────────
android-goal:
name: Android — natural language goal
runs-on: ubuntu-latest
if: inputs.platform == 'android' && inputs.goal != ''

steps:
- uses: actions/checkout@v4

- uses: AppiumTestDistribution/AppClaw/github-action@feat/parallel-testing-video-recording
id: run
with:
goal: ${{ inputs.goal }}
platform: android
provider: gemini
api-key: ${{ secrets.LLM_API_KEY }}
report-name: layer3-android-goal-${{ github.run_id }}

- name: Show report path
if: always()
run: echo "Report → ${{ steps.run.outputs.report-path }}"

# ── Test 3: YAML flow on iOS ─────────────────────────────────────────────────
ios-flow:
name: iOS — YAML flow
runs-on: macos-14
if: inputs.platform == 'ios'

steps:
- uses: actions/checkout@v4

- uses: AppiumTestDistribution/AppClaw/github-action@feat/parallel-testing-video-recording
id: run
with:
flow: ${{ inputs.flow }}
platform: ios
provider: gemini
api-key: ${{ secrets.LLM_API_KEY }}
report-name: layer3-ios-flow-${{ github.run_id }}

- name: Show report path
if: always()
run: echo "Report → ${{ steps.run.outputs.report-path }}"
2 changes: 1 addition & 1 deletion flows/youtube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ steps:
- Open youtube app
- wait for search icon to be visible
- Click on Search icon
- Enter appium 3.0
- Type appium 3.0
- Click on the first result from the list
- wait 3s
- scroll down
Expand Down
Loading
Loading