Skip to content

ci: run tests on a GitHub-hosted Linux runner - #14

Merged
gold-silver-copper merged 2 commits into
mainfrom
ci/test-on-github-hosted
Nov 15, 2026
Merged

gold-silver-copper merged 2 commits into
mainfrom
ci/test-on-github-hosted

Conversation

@gold-silver-copper

@gold-silver-copper gold-silver-copper commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The test job ran on self-hosted Macs ([self-hosted, macOS, ARM64]). This is a public repository, so it should not depend on self-hosted runners. This moves the job to GitHub's free hosted Linux runner.

Why Linux and not macOS: make test runs bats tests/ against plugin/scripts/*.sh. The tests use bash, git, mktemp and git-kb, with nothing macOS-specific. On this PR all 12 tests pass on ubuntu-latest.

Before:

    # Self-hosted for sccache; fork PRs blocked for security
    runs-on: [self-hosted, macOS, ARM64]
    steps:
      - name: Install git-kb from source
        env:
          RUSTC_WRAPPER: sccache
        run: |
          git ... clone https://github.com/gitkb/gitkb-core.git ...
          cargo install --path ... gitkb-cli ...
      - name: Install test deps
        run: command -v bats >/dev/null || brew install bats-core parallel

After:

    # Fork PRs skip this job
    runs-on: ubuntu-latest
    steps:
      - name: Install released git-kb
        run: |
          gh release download -R gitkb/gitkb-releases -p 'gitkb-linux-x64.tar.gz*'
          sha256sum -c gitkb-linux-x64.tar.gz.sha256
          tar -xzf gitkb-linux-x64.tar.gz -C "$INSTALL_DIR"
      - name: Install test deps
        run: sudo apt-get update && sudo apt-get install -y bats parallel
  • git-kb now comes from the latest public release (currently 0.2.19, checksum verified), not a source build. On a hosted runner the repo token cannot clone the private sources: the first push on this PR failed with fatal: could not read Username at that clone. One consequence: the tests now check the hooks against the released CLI, not unreleased main.
  • The sccache wrapper is gone; it only helped on a persistent host. The test job takes about 15 s now.
  • The fork guard (if: on push or same-repo PRs) is unchanged.

Not verified: nothing was run locally; this PR's CI is the check.

Summary by CodeRabbit

  • Chores
    • Updated the automated test environment to run on Linux and use a verified released git-kb package. Test dependencies are now installed through the system package manager.
    • The existing pull-request testing condition remains unchanged. These updates affect the project’s testing infrastructure and do not change user-facing functionality.

…Macs

The tests are bash and bats with nothing macOS-specific, so ubuntu-latest
runs them. Drops the sccache wrapper, which needed a persistent host, and
installs bats from apt. The fork guard stays.
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

Walkthrough

The test job now runs on ubuntu-latest. It downloads and verifies a released Linux x64 git-kb archive, then installs bats and parallel with apt-get.

Changes

CI Workflow

Layer / File(s) Summary
Test job setup
.github/workflows/ci.yml
The test job uses ubuntu-latest, downloads and verifies the released Linux x64 git-kb archive, and adds its extraction directory to GITHUB_PATH. It installs bats and parallel with apt-get.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: Minimal · up to 21182

This only changes how CI runs tests, moving to a GitHub-hosted Linux runner with a released git-kb binary. No production behavior changes, and the PR's own CI run will show whether the test fixtures work with the released CLI.

Pre-merge checks: Passed 2

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "ci: run tests on a GitHub-hosted Linux runner" matches the main change. The test job moves from a self-hosted macOS ARM64 runner to ubuntu-latest, as described in the summary and objectives…
Full details: Title check

Explanation

The title "ci: run tests on a GitHub-hosted Linux runner" matches the main change. The test job moves from a self-hosted macOS ARM64 runner to ubuntu-latest, as described in the summary and objectives. The title is specific and concise. It does not mention the git-kb release-archive change, but that is a supporting detail, not the main point.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the checksum twice,
Then hops where Linux runners rise.
The tests find tools, all set to go,
While carrots wait beneath the snow.
CI springs along, neat as can be!

@coderabbitai
coderabbitai Bot requested a review from mateodelnorte November 15, 2026 22:04
The repo token can't clone the private gitkb sources from a GitHub-hosted
runner. The public release is enough for these hook tests.
@gold-silver-copper
gold-silver-copper merged commit c341b4b into main Nov 15, 2026
2 of 3 checks passed
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.

1 participant