From e04b4e19553cf1e1539b5035a76e68f2eeee3038 Mon Sep 17 00:00:00 2001 From: Mads Hartmann Date: Mon, 8 Jun 2026 13:18:35 +0000 Subject: [PATCH] Add Dev Container and Ona automations Configure a reproducible development environment for the pnpm monorepo: - Dev Container based on the javascript-node:22 image, with shellcheck and shfmt installed (required by the server test suite) and pnpm pinned to the version in .tool-versions. - Ona automations for install, compile, test, and lint, mirroring the CI workflow. Co-authored-by: Ona --- .devcontainer/Dockerfile | 11 ++++++++++ .devcontainer/devcontainer.json | 11 ++++++++++ .ona/automations.yaml | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .ona/automations.yaml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..08fe1693c --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,11 @@ +FROM mcr.microsoft.com/devcontainers/javascript-node:22 + +# shellcheck and shfmt are required by the server test suite. +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends shellcheck shfmt \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Pin pnpm to the version in .tool-versions. A newer pnpm resolves the +# lockfile overrides differently and breaks the frozen install, so install +# this exact version globally (npm-global bin precedes the corepack shim on PATH). +RUN npm install -g pnpm@10.12.1 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..86a67125d --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,11 @@ +// The Dev Container format allows you to configure your environment. At the heart of it +// is a Docker image or Dockerfile which controls the tools available in your environment. +// +// See https://aka.ms/devcontainer.json for more information. +{ + "name": "bash-language-server", + "build": { + "context": ".", + "dockerfile": "Dockerfile" + } +} diff --git a/.ona/automations.yaml b/.ona/automations.yaml new file mode 100644 index 000000000..d28410bf6 --- /dev/null +++ b/.ona/automations.yaml @@ -0,0 +1,38 @@ +tasks: + install: + name: Install dependencies + description: Install workspace dependencies with pnpm (frozen lockfile). + command: | + pnpm install --frozen-lockfile + triggeredBy: + - postDevcontainerStart + + compile: + name: Compile + description: Build the TypeScript sources for the server and client. + command: | + pnpm compile + triggeredBy: + - postDevcontainerStart + dependsOn: + - install + + test: + name: Test + description: Run the Jest test suite (requires shellcheck and shfmt). + command: | + pnpm test + triggeredBy: + - manual + dependsOn: + - install + + lint: + name: Lint + description: Run ESLint and Prettier checks. + command: | + pnpm lint:bail + triggeredBy: + - manual + dependsOn: + - install