Skip to content

fix: cache in github actions#96

Merged
ro80t merged 13 commits into
mainfrom
fix-cache
Jun 29, 2026
Merged

fix: cache in github actions#96
ro80t merged 13 commits into
mainfrom
fix-cache

Conversation

@ro80t

@ro80t ro80t commented Jun 28, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features
    • Improved CI performance by caching Bun install artifacts during setup.
  • Bug Fixes
    • Fixed container user/group ID configuration to prevent incorrect group ID handling.
  • Changes
    • Updated Docker Compose to remove the extra cache volume mount and keep only the node_modules workspace volume.
    • Adjusted web Playwright flow to install without building Storybook, and to start preview without rebuilding.
    • Updated Turbo task behavior: tests now depend on build, and setup task caching is disabled.
    • Made the dev container idle indefinitely via the updated startup command.

@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR updates setup caching and task behavior, changes the Playwright web server startup command, and adjusts Docker compose and Dockerfile runtime configuration.

Changes

Setup, test, and caching updates

Layer / File(s) Summary
Setup workflow and task caching
.github/workflows/setup/action.yml, turbo.json, src/presentation/web/package.json
The setup workflow caches Bun install artifacts, Turbo setup caching is disabled, and the web setup script runs only Playwright installation.
Playwright web server command
src/presentation/web/playwright.config.ts
The Playwright web server now starts with npm run preview instead of building first.

Docker runtime updates

Layer / File(s) Summary
Docker compose and user ID fixes
docker/docker-compose.yml, docker/docker-compose.dev.yml, docker/dockerfile
The Docker compose files remove the cache volume, keep the node modules mount, set the dev container to sleep indefinitely, and the Dockerfile group ID check now compares the ubuntu group ID against USER_GID.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Bun naps in a shiny cache,
Playwright skips the build-in-a-flash.
Docker settles, quiet and neat,
With group IDs and mounts in tidy beat.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main theme of the changeset: fixing cache-related behavior in GitHub Actions and adjacent CI setup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-cache

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

github-actions Bot pushed a commit that referenced this pull request Jun 28, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/presentation/web/package.json`:
- Line 15: The setup script in package.json still invokes npm for the follow-up
Storybook build, which violates the Bun-only toolchain contract. Update the
setup command to call bun run build-storybook instead of npm run
build-storybook, keeping the existing Playwright install step intact and
preserving the current script name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ed8a4fa-9262-4f73-a66c-9f2213d53968

📥 Commits

Reviewing files that changed from the base of the PR and between 0856377 and c844ade.

📒 Files selected for processing (5)
  • .github/workflows/setup/action.yml
  • docker/docker-compose.yml
  • docker/dockerfile
  • src/presentation/web/package.json
  • turbo.json
💤 Files with no reviewable changes (1)
  • docker/docker-compose.yml

Comment thread src/presentation/web/package.json Outdated
"lint": "prettier --check . && eslint .",
"format": "prettier --write .",
"setup": "playwright install --with-deps && npm run build-storybook",
"setup": "PLAYWRIGHT_BROWSERS_PATH=../../../.cache/ms-playwright playwright install --with-deps && npm run build-storybook",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use Bun for the follow-up script invocation.

This script still shells out to npm run build-storybook, which breaks the repo-wide package-manager contract. Switch it to bun run build-storybook so setup stays on the same toolchain.

Suggested change
-    "setup": "PLAYWRIGHT_BROWSERS_PATH=../../../.cache/ms-playwright playwright install --with-deps && npm run build-storybook",
+    "setup": "PLAYWRIGHT_BROWSERS_PATH=../../../.cache/ms-playwright playwright install --with-deps && bun run build-storybook",

As per coding guidelines, "Use Bun as the runtime and package manager for all development tasks".

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"setup": "PLAYWRIGHT_BROWSERS_PATH=../../../.cache/ms-playwright playwright install --with-deps && npm run build-storybook",
"setup": "PLAYWRIGHT_BROWSERS_PATH=../../../.cache/ms-playwright playwright install --with-deps && bun run build-storybook",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/presentation/web/package.json` at line 15, The setup script in
package.json still invokes npm for the follow-up Storybook build, which violates
the Bun-only toolchain contract. Update the setup command to call bun run
build-storybook instead of npm run build-storybook, keeping the existing
Playwright install step intact and preserving the current script name.

Source: Coding guidelines

@github-actions

Copy link
Copy Markdown
Contributor

github-actions Bot pushed a commit that referenced this pull request Jun 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

github-actions Bot pushed a commit that referenced this pull request Jun 29, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/presentation/web/package.json`:
- Line 15: The Playwright setup script in package.json no longer matches the
cached browser location used by the workflow. Update the setup command or the
Playwright browser path configuration so that the browser install uses
.cache/ms-playwright again, or adjust the caching logic to the default
Playwright directory; make sure the change is reflected in the setup script and
any related Playwright configuration symbols.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6bbe35d3-94ad-4d92-be30-504827166df7

📥 Commits

Reviewing files that changed from the base of the PR and between c844ade and a99a75b.

📒 Files selected for processing (1)
  • src/presentation/web/package.json

Comment thread src/presentation/web/package.json
@github-actions

Copy link
Copy Markdown
Contributor

github-actions Bot pushed a commit that referenced this pull request Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

github-actions Bot pushed a commit that referenced this pull request Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

github-actions Bot pushed a commit that referenced this pull request Jun 29, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/presentation/web/playwright.config.ts`:
- Line 9: The Playwright preview command in the config is using npm directly and
skips the required build step, which can fail on a clean run. Update the preview
setup in the playwright config so it follows the repo’s Bun script convention
and runs the build before starting preview, ensuring the existing dist output is
created first. Use the preview command entry in the Playwright config to make
this change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a037aea3-e64f-4136-a4b6-a4f51bbb18e0

📥 Commits

Reviewing files that changed from the base of the PR and between ae17db4 and 51580e9.

📒 Files selected for processing (4)
  • docker/docker-compose.dev.yml
  • docker/docker-compose.yml
  • src/presentation/web/playwright.config.ts
  • turbo.json
💤 Files with no reviewable changes (1)
  • docker/docker-compose.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • turbo.json

},
webServer: {
command: "npm run build && npm run preview",
command: "npm run preview",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== playwright.config.ts ==\n'
cat -n src/presentation/web/playwright.config.ts | sed -n '1,120p'

printf '\n== package.json ==\n'
cat -n src/presentation/web/package.json | sed -n '1,120p'

printf '\n== search for webServer command / preview usage ==\n'
rg -n '"npm run preview"|"bun run preview"|"vite preview"|"build && preview"|"playwright' src/presentation/web -S

Repository: ThunLights/distopia

Length of output: 4640


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== root package/workflow references ==\n'
rg -n '"test:e2e"|"playwright test"|"vite build"|"bun run build"|"npm run build"|"npm run preview"|"bun run preview"|"playwright install"|"preview"' \
  . \
  -g '!**/node_modules/**' \
  -g '!**/dist/**' \
  -g '!**/.git/**' \
  -S

printf '\n== files mentioning playwright.config.ts or webServer ==\n'
rg -n 'webServer|playwright.config.ts|reuseExistingServer|baseURL' src .github . -g '!**/node_modules/**' -S

Repository: ThunLights/distopia

Length of output: 1119


Restore the build step before preview. vite preview expects an existing dist, so npm run preview can fail on a clean Playwright run and bypasses the repo’s Bun-only script convention.

Suggested change
-    command: "npm run preview",
+    command: "bun run build && bun run preview",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
command: "npm run preview",
command: "bun run build && bun run preview",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/presentation/web/playwright.config.ts` at line 9, The Playwright preview
command in the config is using npm directly and skips the required build step,
which can fail on a clean run. Update the preview setup in the playwright config
so it follows the repo’s Bun script convention and runs the build before
starting preview, ensuring the existing dist output is created first. Use the
preview command entry in the Playwright config to make this change.

Source: Coding guidelines

@ro80t ro80t merged commit a171f3e into main Jun 29, 2026
26 checks passed
@ro80t ro80t deleted the fix-cache branch June 29, 2026 04:55
github-actions Bot pushed a commit that referenced this pull request Jun 29, 2026
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