mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
Consolidate CI workflows into a single entry point (#836)
* refactor: consolidate CI workflows with ci-all.yml orchestrator - Add ci-all.yml to orchestrate all CI workflows on push to main - Update individual workflows to use workflow_call for reusability - Remove redundant push triggers from individual test workflows - Update release.yml to trigger on CI All workflow completion - Auto-release on version bump commits after CI passes Co-Authored-By: Claude <noreply@anthropic.com> Claude-Generated-By: Claude Code (cli/claude-opus-4-5=100%) Claude-Steers: 8 Claude-Permission-Prompts: 1 Claude-Escapes: 0 * address security review comments --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
37
.github/workflows/ci-all.yml
vendored
Normal file
37
.github/workflows/ci-all.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Orchestrates all CI workflows - runs on PRs, pushes to main, and manual dispatch
|
||||||
|
# Individual test workflows are called as reusable workflows
|
||||||
|
name: CI All
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
uses: ./.github/workflows/ci.yml
|
||||||
|
|
||||||
|
test-base-action:
|
||||||
|
uses: ./.github/workflows/test-base-action.yml
|
||||||
|
secrets: inherit # Required for ANTHROPIC_API_KEY
|
||||||
|
|
||||||
|
test-custom-executables:
|
||||||
|
uses: ./.github/workflows/test-custom-executables.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
test-mcp-servers:
|
||||||
|
uses: ./.github/workflows/test-mcp-servers.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
test-settings:
|
||||||
|
uses: ./.github/workflows/test-settings.yml
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
test-structured-output:
|
||||||
|
uses: ./.github/workflows/test-structured-output.yml
|
||||||
|
secrets: inherit
|
||||||
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@@ -1,9 +1,8 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -8,10 +8,23 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["CI All"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create-release:
|
create-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Run if: manual dispatch OR (CI All succeeded AND commit is a version bump)
|
||||||
|
if: |
|
||||||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
|
(github.event.workflow_run.conclusion == 'success' &&
|
||||||
|
github.event.workflow_run.head_branch == 'main' &&
|
||||||
|
github.event.workflow_run.event == 'push' &&
|
||||||
|
startsWith(github.event.workflow_run.head_commit.message, 'chore: bump Claude Code to'))
|
||||||
environment: production
|
environment: production
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -84,7 +97,8 @@ jobs:
|
|||||||
|
|
||||||
update-major-tag:
|
update-major-tag:
|
||||||
needs: create-release
|
needs: create-release
|
||||||
if: ${{ !inputs.dry_run }}
|
# Skip for dry runs (workflow_run events are never dry runs)
|
||||||
|
if: github.event_name == 'workflow_run' || !inputs.dry_run
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
environment: production
|
environment: production
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
4
.github/workflows/test-base-action.yml
vendored
4
.github/workflows/test-base-action.yml
vendored
@@ -1,9 +1,6 @@
|
|||||||
name: Test Claude Code Action
|
name: Test Claude Code Action
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -11,6 +8,7 @@ on:
|
|||||||
description: "Test prompt for Claude"
|
description: "Test prompt for Claude"
|
||||||
required: false
|
required: false
|
||||||
default: "List the files in the current directory starting with 'package'"
|
default: "List the files in the current directory starting with 'package'"
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-inline-prompt:
|
test-inline-prompt:
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
name: Test Custom Executables
|
name: Test Custom Executables
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-custom-executables:
|
test-custom-executables:
|
||||||
|
|||||||
4
.github/workflows/test-mcp-servers.yml
vendored
4
.github/workflows/test-mcp-servers.yml
vendored
@@ -1,11 +1,9 @@
|
|||||||
name: Test MCP Servers
|
name: Test MCP Servers
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-mcp-integration:
|
test-mcp-integration:
|
||||||
|
|||||||
4
.github/workflows/test-settings.yml
vendored
4
.github/workflows/test-settings.yml
vendored
@@ -1,11 +1,9 @@
|
|||||||
name: Test Settings Feature
|
name: Test Settings Feature
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test-settings-inline-allow:
|
test-settings-inline-allow:
|
||||||
|
|||||||
4
.github/workflows/test-structured-output.yml
vendored
4
.github/workflows/test-structured-output.yml
vendored
@@ -1,11 +1,9 @@
|
|||||||
name: Test Structured Outputs
|
name: Test Structured Outputs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
pull_request:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|||||||
Reference in New Issue
Block a user