Skip to content

chore: use reusable workflow for CI action - #256

Merged
albertodonato merged 1 commit into
mainfrom
ack/reusable-workflow-ci
Oct 20, 2026
Merged

albertodonato merged 1 commit into
mainfrom
ack/reusable-workflow-ci

Conversation

@albertodonato

Copy link
Copy Markdown
Contributor

what

Switch linting and testing CI actions to use the reusable workflow

why

Less duplication, replace local reusable workflow

testing

runs on the PR

docs

n/a

### what

Switch linting and testing CI actions to use the reusable workflow

### why

Less duplication, replace local reusable workflow

### testing

runs on the PR

### docs

n/a
@albertodonato
albertodonato marked this pull request as ready for review October 20, 2026 14:35
@albertodonato
albertodonato requested a review from a team as a code owner October 20, 2026 14:35

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files

Confidence score: 4/5

  • Renaming the jobs in .github/workflows/ci.yaml changes the status-check names, so branch protection that requires lint or test may leave PRs waiting on checks that no longer exist. Keep the IDs or update the required checks alongside the rename.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/ci.yaml">

<violation number="1" location=".github/workflows/ci.yaml:29">
P2: Renaming the job ids from `lint`/`test` to `Lint`/`Tests` changes the status check names reported on PRs. If branch protection requires the existing `lint`/`test` checks, PRs can get stuck waiting on checks that never report. Keep the original lowercase job ids, and confirm the required check names in branch protection match the new ones.</violation>
</file>
Architecture diagram
sequenceDiagram
    participant GH as GitHub Actions
    participant Local as Local Repo Workflow
    participant Remote as Remote Reusable Workflow
    participant RemoteRepo as stacklet/github-tooling Repo
    participant Runner as CI Runner (ubuntu-latest)
    participant Tooling as Pre-commit Tooling
    participant Just as Just Task Runner

    Note over GH,Just: CI Pipeline Runtime Flow

    GH->>Local: Trigger CI workflow (push/PR)
    Local->>GH: Declare Lint job (permissions: contents: read)
    Local->>Remote: Call reusable run-script.yml workflow
    Remote->>RemoteRepo: Resolve workflow at pinned commit
    RemoteRepo-->>Remote: Workflow definition
    Remote->>GH: Pass secrets (STEP_SECURITY_API_KEY)
    Remote->>Runner: Provision runner

    Runner->>Tooling: Install mise + tools (incl. prek 0.5.6)
    Tooling->>Tooling: Ensure just is available
    Runner->>Remote: Execute pre-commit cache setup
    Remote->>Runner: Configure GitHub token auth
    Runner->>Just: Invoke "just lint" command
    Just->>Just: Run prek --all-files (lint targets)
    Just-->>Runner: Completion status
    Runner-->>Remote: Lint results
    Remote-->>GH: Job completion

    alt Lint succeeds
        GH->>Local: Trigger Tests job
        Local->>Remote: Call run-script.yml again
        Remote->>Runner: Provision second runner
        Runner->>Just: Invoke "just test" command
        Just->>Just: Execute test suite
        Just-->>Runner: Test results
        Runner-->>Remote: Test status
        Remote-->>GH: Job completion
    else Lint fails
        GH->>Local: Fail workflow immediately
        Local-->>GH: Workflow stopped
    end

    Note over GH,Just: Secrets passed securely and no local workflow duplication
Loading

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/ci.yaml
test:
name: test
uses: ./.github/workflows/_run-just.yaml
Tests:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Renaming the job ids from lint/test to Lint/Tests changes the status check names reported on PRs. If branch protection requires the existing lint/test checks, PRs can get stuck waiting on checks that never report. Keep the original lowercase job ids, and confirm the required check names in branch protection match the new ones.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At .github/workflows/ci.yaml, line 29:

<comment>Renaming the job ids from `lint`/`test` to `Lint`/`Tests` changes the status check names reported on PRs. If branch protection requires the existing `lint`/`test` checks, PRs can get stuck waiting on checks that never report. Keep the original lowercase job ids, and confirm the required check names in branch protection match the new ones.</comment>

<file context>
@@ -13,15 +13,25 @@ permissions:
-  test:
-    name: test
-    uses: ./.github/workflows/_run-just.yaml
+  Tests:
+    permissions:
+      contents: read
</file context>
Suggested change
Tests:
test:

@albertodonato albertodonato Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intended change, to match other repos using the workflow

@jtroup jtroup left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@albertodonato
albertodonato merged commit 6eec89a into main Oct 20, 2026
4 checks passed
@albertodonato
albertodonato deleted the ack/reusable-workflow-ci branch October 20, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants