Skip to content
This repository was archived by the owner on Jul 31, 2026. It is now read-only.
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
30 changes: 30 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,33 @@ INPUT_MILLISECONDS=2400
# RUNNER_OS=""
# RUNNER_TEMP=""
# RUNNER_TOOL_CACHE=""


# =========================
# GitHub Action local debug
# =========================

# Required inputs
INPUT_API-TOKEN=your_shiplight_api_token_here
INPUT_TEST-SUITE-ID=101,102,103
INPUT_ENVIRONMENT-ID=12

# Optional inputs
INPUT_ENVIRONMENT-URL=https://staging.example.com
INPUT_PREFLIGHT-TEST-CASE-ID=9001
INPUT_ASYNC=false
INPUT_TIMEOUT-SECONDS=1800
INPUT_GITHUB-COMMENT=false
INPUT_GITHUB-TOKEN=ghp_xxx_if_you_need_pr_comment
INPUT_COMMIT-SHA=

# Optional API/APP endpoint overrides (for dev/staging)
SHIPLIGHT_API_URL=https://api.shiplight.ai
SHIPLIGHT_APP_URL=https://app.shiplight.ai

# GitHub context for local PR metadata mocking
GITHUB_EVENT_NAME=pull_request
GITHUB_EVENT_PATH=__fixtures__/mock-event-pull-request.json
GITHUB_REPOSITORY=jinfengLoggia/cicd-demo
GITHUB_REF=refs/pull/1/merge
GITHUB_SHA=96cd365d0fc7db2574121ce94195dfb2b032c393
10 changes: 10 additions & 0 deletions __fixtures__/mock-event-pull-request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"pull_request": {
"number": 1,
"title": "feat: improve checkout flow"
},
"head_commit": {
"id": "96cd365d0fc7db2574121ce94195dfb2b032c393",
"message": "fix: stabilize login step\n\nretry selector with timeout"
}
}
26 changes: 21 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ name: shiplight-runner
description: Use This GitHub Action to run tests on https://app.shiplight.ai
author: Shiplight AI

# Add your action's branding here. This will appear on the GitHub Marketplace.
branding:
icon: 'cloud-lightning'
color: 'blue'

# Define your inputs here.
inputs:
api-token:
description: api token for shiplight
required: true
test-suite-id:
description:
test suite ID (single ID or comma-separated list, e.g., "suite1" or
"suite1,suite2,suite3")
test suite ID (single ID or comma-separated list, e.g., "1" or "1,2,3")
required: true
preflight-test-case-id:
description:
optional preflight test case ID. If set, the preflight test runs before
main test suites
required: false
environment-id:
description: environment id
required: true
Expand All @@ -43,13 +45,27 @@ inputs:
description: 'Maximum time to wait for test runs to complete (in seconds)'
required: false
default: '86400'
test-context:
description: |
Test context key-value pairs to pass to the test run, one per line in KEY=VALUE format.
Example:
env=staging
feature-flag=enabled
required: false

# Define your outputs here.
outputs:
success:
description: Whether all test runs were successful
results:
description: JSON string containing results for each test suite
run-id:
description: Shiplight run ID
run-url:
description: Shiplight run result URL
preflight-result:
description: Preflight result (Passed|Failed|Skipped|Pending)
metadata:
description: Trigger metadata JSON string

runs:
using: node20
Expand Down
Loading
Loading