Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
24 changes: 24 additions & 0 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,30 @@ runs:
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Cache Bun install
uses: actions/cache@v6
with:
path: .cache/bun/install
key: ${{ runner.os }}-bun-install-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-install-

- name: Cache Playwright browsers
uses: actions/cache@v6
with:
path: .cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('src/presentation/web/package.json') }}
restore-keys: |
${{ runner.os }}-playwright-

- name: Cache Turbo
uses: actions/cache@v6
with:
path: .cache/turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

- name: Checkout Container
working-directory: ./docker/
shell: bash
Expand Down
2 changes: 0 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ services:
command: sleep infinity
volumes:
- ..:/workspaces/distopia:cached
- distopia-cache:/workspaces/distopia/.cache
- distopia-node-modules:/workspaces/distopia/node_modules

volumes:
distopia-db-store:
external: true
distopia-cache:
distopia-node-modules:

networks:
Expand Down
2 changes: 1 addition & 1 deletion docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

RUN [[ $(id -u ubuntu) = $USER_UID ]] || usermod -u $USER_UID ubuntu \
&& [[ $(id -u ubuntu) = $USER_GID ]] || groupmod -g $USER_GID ubuntu \
&& [[ $(id -g ubuntu) = $USER_GID ]] || groupmod -g $USER_GID ubuntu \
&& echo "ubuntu ALL=NOPASSWD: ALL" > /etc/sudoers.d/ubuntu \
&& chmod 0440 /etc/sudoers.d/ubuntu

Expand Down
2 changes: 1 addition & 1 deletion src/presentation/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"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

"test:unit": "vitest",
"test": "npm run test:unit -- --run && npm run test:e2e",
"test:e2e": "playwright test",
Expand Down
1 change: 1 addition & 0 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "./node_modules/turbo/schema.json",
"cacheDir": ".cache/turbo",
"tasks": {
"build": {
"dependsOn": ["^build"],
Expand Down
Loading