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
8 changes: 4 additions & 4 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
} >> "$GITHUB_OUTPUT"

- name: Calculate new version
if: steps.analyze.outputs.bump != 'none'
if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump != 'none'
id: version
env:
LATEST_TAG: ${{ steps.latest-tag.outputs.tag }}
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
echo "tag=$NEW_TAG" >> "$GITHUB_OUTPUT"

- name: Create and push tag
if: steps.analyze.outputs.bump != 'none'
if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump != 'none'
env:
NEW_TAG: ${{ steps.version.outputs.tag }}
GH_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}
Expand All @@ -190,7 +190,7 @@ jobs:
echo "Tag $NEW_TAG created successfully via GitHub API"

- name: Summary
if: steps.analyze.outputs.bump != 'none'
if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump != 'none'
env:
NEW_TAG: ${{ steps.version.outputs.tag }}
BUMP: ${{ steps.analyze.outputs.bump }}
Expand All @@ -211,7 +211,7 @@ jobs:
} >> "$GITHUB_STEP_SUMMARY"

- name: No release needed
if: steps.analyze.outputs.bump == 'none'
if: steps.guard.outputs.skip != 'true' && steps.analyze.outputs.bump == 'none'
run: |
{
echo "## No Release Needed"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:

jobs:
docs:
uses: YiAgent/OpenCI/.github/workflows/reusable-docs.yml@4e1ecadc2505761f104f3fd8d255eee4eb369d90
uses: YiAgent/OpenCI/.github/workflows/reusable-docs.yml@9bd9cf085ba9d3a199b701d42ea054e1625a65ce
with:
build-cmd: ${{ vars.DOCS_BUILD_CMD || '' }}
docs-path: ${{ vars.DOCS_DIR || 'docs' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-main-bump-sha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ jobs:
} >> "$GITHUB_OUTPUT"

- name: Run bump-self-sha.sh
if: steps.check.outputs.skip != 'true'
if: steps.guard.outputs.skip != 'true' && steps.check.outputs.skip != 'true'
run: bash scripts/bump-self-sha.sh

- name: Commit, supersede older bumps, open PR
if: steps.check.outputs.skip != 'true'
if: steps.guard.outputs.skip != 'true' && steps.check.outputs.skip != 'true'
env:
# gh CLI uses GH_TOKEN; same PAT used for checkout above so the
# push picks up workflow scope.
Expand Down
1 change: 0 additions & 1 deletion tests/actions/issue-agent-workflow.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ setup() {
@test "issue workflow exposes the three consolidated modes" {
grep -q 'lifecycle | maintenance | ingest' "$WORKFLOW"
grep -q 'mode: lifecycle' "$ENTRY"
grep -q 'mode: ingest' "$ENTRY"
grep -q 'mode: maintenance' "$ENTRY"
}

Expand Down
44 changes: 9 additions & 35 deletions tests/actions/on-issue-routing.bats
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,15 @@ setup() {
grep -q '0 2 \* \* \*' "$ENTRY"
}

@test "on-issue declares repository_dispatch with linear-issue-started and sentry-issue types" {
grep -q 'repository_dispatch:' "$ENTRY"
grep -q 'linear-issue-started' "$ENTRY"
grep -q 'sentry-issue' "$ENTRY"
}

@test "on-issue declares workflow_dispatch with mode choice input" {
grep -q 'workflow_dispatch:' "$ENTRY"
grep -q 'mode:' "$ENTRY"
grep -q 'type: choice' "$ENTRY"
grep -q 'default: lifecycle' "$ENTRY"
}

@test "on-issue workflow_dispatch mode options include lifecycle, maintenance, ingest" {
grep -q 'options: \[lifecycle, maintenance, ingest\]' "$ENTRY"
@test "on-issue workflow_dispatch mode options include lifecycle and maintenance" {
grep -q 'options: \[lifecycle, maintenance\]' "$ENTRY"
}

# ---------------------------------------------------------------------------
Expand All @@ -56,10 +50,6 @@ setup() {
grep -q "github.event_name == 'issue_comment'" "$ENTRY"
}

@test "ingest job runs on repository_dispatch event" {
grep -q "github.event_name == 'repository_dispatch'" "$ENTRY"
}

@test "maintenance job runs on schedule and workflow_dispatch with maintenance mode" {
grep -q "github.event_name == 'schedule'" "$ENTRY"
grep -q "inputs.mode == 'maintenance'" "$ENTRY"
Expand All @@ -79,10 +69,6 @@ setup() {
grep -q 'mode: lifecycle' "$ENTRY"
}

@test "ingest job passes mode: ingest" {
grep -q 'mode: ingest' "$ENTRY"
}

@test "maintenance job passes mode: maintenance" {
grep -q 'mode: maintenance' "$ENTRY"
}
Expand All @@ -96,10 +82,10 @@ setup() {
# Reusable workflow reference
# ---------------------------------------------------------------------------

@test "all four jobs call the same reusable workflow issue.yml" {
@test "all three jobs call the same reusable workflow reusable-issue.yml" {
local count
count=$(grep -c 'uses: YiAgent/OpenCI/.github/workflows/reusable-issue\.yml' "$ENTRY")
[ "$count" -eq 4 ]
[ "$count" -eq 3 ]
}

# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -153,37 +139,25 @@ setup() {
@test "all jobs pass anthropic-api-key secret" {
local count
count=$(grep -c 'anthropic-api-key:' "$ENTRY")
[ "$count" -eq 4 ]
[ "$count" -eq 3 ]
}

@test "all jobs pass api-base-url secret" {
local count
count=$(grep -c 'api-base-url:' "$ENTRY")
[ "$count" -eq 4 ]
}

@test "all jobs pass sentry-token secret" {
local count
count=$(grep -c 'sentry-token:' "$ENTRY")
[ "$count" -eq 4 ]
}

@test "all jobs pass linear-token secret" {
local count
count=$(grep -c 'linear-token:' "$ENTRY")
[ "$count" -eq 4 ]
[ "$count" -eq 3 ]
}

@test "all jobs pass slack-webhook-url secret" {
local count
count=$(grep -c 'slack-webhook-url:' "$ENTRY")
[ "$count" -eq 4 ]
[ "$count" -eq 3 ]
}

@test "all jobs pass mcp-dispatch-token secret" {
local count
count=$(grep -c 'mcp-dispatch-token:' "$ENTRY")
[ "$count" -eq 4 ]
[ "$count" -eq 3 ]
}

# ---------------------------------------------------------------------------
Expand All @@ -193,5 +167,5 @@ setup() {
@test "all jobs specify the same runner" {
local count
count=$(grep -c 'runner: blacksmith-2vcpu-ubuntu-2404' "$ENTRY")
[ "$count" -eq 4 ]
[ "$count" -eq 3 ]
}
8 changes: 4 additions & 4 deletions tests/actions/self-test-routing.bats
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ setup() {
grep -q 'schedule:' "$issue_entry"
}

@test "issue-ops.yml declares repository_dispatch trigger" {
@test "issue-ops.yml declares workflow_dispatch trigger" {
local issue_entry="${PROJECT_ROOT}/.github/workflows/issue-ops.yml"
grep -q 'repository_dispatch:' "$issue_entry"
grep -q 'workflow_dispatch:' "$issue_entry"
}

@test "issue-ops.yml calls reusable reusable-issue.yml" {
Expand All @@ -235,9 +235,9 @@ setup() {
grep -q 'lifecycle:' "$issue_entry"
}

@test "issue-ops.yml has ingest job" {
@test "issue-ops.yml has manual job" {
local issue_entry="${PROJECT_ROOT}/.github/workflows/issue-ops.yml"
grep -q 'ingest:' "$issue_entry"
grep -q 'manual:' "$issue_entry"
}

@test "issue-ops.yml has maintenance job" {
Expand Down
Loading