diff --git a/.github/workflows/setup/action.yml b/.github/workflows/setup/action.yml index 7ca6fc62..4aba2fbd 100644 --- a/.github/workflows/setup/action.yml +++ b/.github/workflows/setup/action.yml @@ -24,6 +24,14 @@ 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: Checkout Container working-directory: ./docker/ shell: bash diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 294ecc20..bab86172 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -6,6 +6,7 @@ services: hostname: thunlights container_name: distopia-dev working_dir: /workspaces/distopia + command: sleep infinity ports: - "127.0.0.1:${PROD_PORT:-3000}:3000" - "127.0.0.1:${DEV_PORT:-5173}:5173" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 4d9e6a4d..d322da35 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -26,16 +26,13 @@ services: init: true networks: - distopia-network - 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: diff --git a/docker/dockerfile b/docker/dockerfile index 5721c925..159505b7 100644 --- a/docker/dockerfile +++ b/docker/dockerfile @@ -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 diff --git a/src/presentation/web/package.json b/src/presentation/web/package.json index a8ebec8c..98132700 100644 --- a/src/presentation/web/package.json +++ b/src/presentation/web/package.json @@ -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 install --with-deps", "test:unit": "vitest", "test": "npm run test:unit -- --run && npm run test:e2e", "test:e2e": "playwright test", diff --git a/src/presentation/web/playwright.config.ts b/src/presentation/web/playwright.config.ts index 9e6d5ec1..5c79bbaf 100644 --- a/src/presentation/web/playwright.config.ts +++ b/src/presentation/web/playwright.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ baseURL: "http://localhost:4173", }, webServer: { - command: "npm run build && npm run preview", + command: "npm run preview", port: 4173, // Reuse the server if it is already running (e.g. from a previous test run or `npm run preview`). reuseExistingServer: true, diff --git a/turbo.json b/turbo.json index 1c13923b..0df058a3 100644 --- a/turbo.json +++ b/turbo.json @@ -6,7 +6,7 @@ "cache": false }, "test": { - "dependsOn": ["^test"], + "dependsOn": ["build", "^test"], "cache": false }, "lint": { @@ -16,7 +16,8 @@ "dependsOn": ["^format"] }, "setup": { - "dependsOn": ["^setup"] + "dependsOn": ["^setup"], + "cache": false }, "typecheck": { "dependsOn": ["^typecheck"]