All jobs

Set Up GitHub Actions CI for a SolidJS App

Yes. An agent reads your SolidJS app's build, lockfile and deploy workflow, adds CI that installs, checks formatting and builds on every PR, and shows it passing.

Run this on RushOpens the console with this prompt ready to send, in a Project that has your repository.

What the agent does

The agent starts by reading what runs today and what does not. In an app like solidjs/solid-realworld there is one workflow, .github/workflows/gh-pages.yml, triggered on push to main and on pull_request: it checks out with actions/checkout@v2, installs Node 14 with actions/setup-node@v2, runs npm install rather than npm ci, runs npm run build, and deploys ./public with peaceiris/actions-gh-pages@v3 behind an if on refs/heads/main. So pull requests do get a build, but as a side effect of a deploy job, with no lockfile enforcement, no format check and a Node version the lockfile no longer matches: package-lock.json is lockfile version 2, written by npm 7 or later, which shipped with Node 15 and up.

It then reads the project itself. package.json has three scripts: start runs serve public -l 5000 -s & rollup -w -c, build runs rollup -c --environment production, and test is the literal string test, a placeholder that fails the moment anything calls npm test. Dependencies are solid-js ^1.3.3 and marked ^0.8.0; the build is Rollup 2.52.3 with @rollup/plugin-babel 5.2.0, babel-preset-solid, @rollup/plugin-node-resolve, @rollup/plugin-commonjs, rollup-plugin-delete and rollup-plugin-terser, all pinned exactly. rollup.config.js bundles src/index.js to public/ as ESM, deletes everything in public/ except index.html first, and only minifies when production is set. There is a .prettierrc (printWidth: 100, trailingComma: none, double quotes) but Prettier is not in devDependencies, and there is no ESLint, no test runner and no .nvmrc. The source is a couple of dozen files under src/components, src/pages and src/store.

With that, the agent writes .github/workflows/ci.yml: pull_request and push to main, a concurrency group keyed on the ref with cancel-in-progress, permissions: contents: read, and one job that checks out, installs Node from a new .nvmrc with the npm cache enabled, runs npm ci, npm run format:check and npm run build, and uploads public/ as a workflow artifact so a reviewer can download the bundle a pull request produced. The Node version is chosen by running the build, not by guessing: the agent tries the current LTS line in the sandbox and steps down only if Rollup 2 or Babel 7.12 refuse it, then writes that version to .nvmrc and into gh-pages.yml so deploy and CI agree. Prettier is added as an exact devDependency with format and format:check scripts over src/**/*.js, the dead test script is removed so npm test no longer lies, and gh-pages.yml loses its pull_request trigger because CI now covers that case and the deploy job was never going to run on one anyway.

The proof is the workflow run on the pull request itself. Before pushing, the agent runs every step the workflow will run, in order, in its sandbox: npm ci from the lockfile, the format check, which it fixes in a separate prettier --write commit if the existing files are not already clean, and the production build, checking that public/index.js exists and public/index.html survived the del plugin. It pushes the branch, opens the pull request, waits for the new ci check to finish, and quotes the step summary and the artifact name in the description.

Start it with one API call

POST https://api.phoenix.so/o/{org}/sessions with this body:

{
  "agent": "claude",
  "input": "Set up GitHub Actions CI for this SolidJS app. Read package.json, package-lock.json, rollup.config.js, .prettierrc and every workflow under .github/workflows first, and note that the lockfile version implies a newer Node than the existing workflow installs, that the test script is a placeholder, and that Prettier is configured but not installed. Add .github/workflows/ci.yml that runs on pull requests and pushes to main with a concurrency group and read-only permissions, installs Node from a new .nvmrc with npm caching, runs npm ci, a Prettier check and the production build, and uploads the built public directory as an artifact. Pick the Node version by running the build in the sandbox, add Prettier as an exact devDependency with format and format:check scripts, remove the placeholder test script, and align the deploy workflow to the same Node version while removing its pull_request trigger. If existing files fail the format check, format them in their own commit. Run every workflow step locally first, open a pull request, and wait for the ci check to pass on it before reporting.",
  "resources": [
    {
      "url": "https://github.com/your-org/your-app"
    }
  ]
}
  1. Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
  2. Send the request. POST the body in request.json to https://api.phoenix.so/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
  3. Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.

What comes back

What comes back is a pull request on its own branch with a new .github/workflows/ci.yml, a new .nvmrc, a small edit to .github/workflows/gh-pages.yml, and package.json and package-lock.json changes that add Prettier and its two scripts and drop the test placeholder. If the source needed formatting, that lands in its own commit so the review of the workflow is not buried under whitespace.

The description names the Node version it settled on and the build output that justified it, lists each workflow step with the time it took on the sandbox run, and links the green ci check on the pull request with the artifact it uploaded. The transcript at GET /o/{org}/sessions/{id}/messages keeps the npm ci, prettier and rollup output in full.

Before merging, a reviewer reads ci.yml once, checks that the Node version in .nvmrc matches gh-pages.yml, and opens the uploaded artifact to confirm public/index.js is the minified bundle rather than the dev one. The remaining gap, that there are still no tests, is stated plainly in the description rather than papered over with a test script that exits zero.

Run it on every terminal hand-off

A developer about to open the third pull request that nobody can tell is broken starts this from the terminal with this body and the repository in resources, then goes back to the feature branch. The run picks its Node version by building, so the workflow it writes is the one this app passes rather than a template that happens to be green elsewhere.

Send a request_id, a UUID, with the body so a retried start returns the run it already began. When the turn ends, GET /o/{org}/sessions/{id} names the pull request, and a follow-up to the same session can add ESLint with eslint-plugin-solid or a Vitest job once there are tests to run.

The use case this job follows, with its automation and trigger: Hand off a long task.

Why run it on Rush?

The hard part of adding CI to an older SolidJS build is not the YAML, it is the version question: a Rollup 2 and Babel 7 toolchain, a lockfile written by a newer npm, and a deploy job pinned to Node 14 can be made to agree only by trying it. The agent tries it in a sandbox of its own, records what worked in .nvmrc, and leaves the attempts in the transcript.

The result is checked by GitHub, not described: the pull request carries its own passing ci run and the bundle it built. Several repositories can be done at once, each in its own sandbox with its own pull request and its own check.

Frequently asked questions

Will it change the existing deploy workflow?

Only in two lines: the Node version moves to the one in .nvmrc, and the pull_request trigger is removed because the deploy step was already guarded by an if on main and the new ci.yml builds every pull request. The checkout, build and peaceiris/actions-gh-pages steps stay as they are.

Why does it pick the Node version by running the build?

Because nothing in the repository states it: there is no engines field and no .nvmrc, the lockfile implies npm 7 or later, and the workflow says 14. Rollup 2.52 and Babel 7.12 run on much newer Node, but the only honest way to know is to run npm ci and npm run build there, which the agent does before writing the number down.

The test script just says test. Does CI run it?

No, and the pull request removes it. "test": "test" runs the shell builtin with no arguments and exits non-zero, so any CI step calling npm test would fail for a reason unrelated to the code. The description says there are no tests yet; adding Vitest and @solidjs/testing-library is a follow-up, not something to fake.

Does it add ESLint too?

Not by default. The repository has a .prettierrc and no ESLint configuration, so the agent enforces what the project already chose and installs only Prettier, pinned exactly to match how every other devDependency here is pinned. A follow-up message can add ESLint with eslint-plugin-solid as its own pull request.

More SolidJS jobs

The same job on other stacks

Keep reading