Compare commits
6
Commits
9e5d8ae075
...
382536168b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
382536168b | ||
|
|
956b2f277b | ||
|
|
37bb4e9ea2 | ||
|
|
72c49e6b0f | ||
|
|
9091bdcfae | ||
|
|
2ddf8961c2 |
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'luna-charts': minor
|
||||||
|
---
|
||||||
|
|
||||||
|
Establish the initial project foundation with architecture, documentation, governance, and development tooling.
|
||||||
@@ -50,7 +50,9 @@ luna-charts/
|
|||||||
│
|
│
|
||||||
├── .changeset/ # Release/versioning configuration
|
├── .changeset/ # Release/versioning configuration
|
||||||
│
|
│
|
||||||
└── .github/ # Community health files (Code of Conduct, etc.)
|
├── .github/ # Community health files (Code of Conduct, etc.)
|
||||||
|
│
|
||||||
|
└── .gitea/ # CI workflows (Gitea Actions) and CI runner image
|
||||||
```
|
```
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
@@ -86,6 +88,10 @@ pnpm install
|
|||||||
| `pnpm test` | Run the full test suite (unit + component) |
|
| `pnpm test` | Run the full test suite (unit + component) |
|
||||||
| `pnpm changeset` | Record a changeset for your change (required for any user-facing change) |
|
| `pnpm changeset` | Record a changeset for your change (required for any user-facing change) |
|
||||||
| `pnpm run docs` | Start the documentation site locally (astroJS) |
|
| `pnpm run docs` | Start the documentation site locally (astroJS) |
|
||||||
|
| `pnpm run lint` | Run the linter to check for code style and quality issues |
|
||||||
|
| `pnpm run format` | Run the formatter to automatically fix code style issues |
|
||||||
|
| `pnpm run test:browser` | Run browser tests (only works inside the `packages/luna-charts` directory) |
|
||||||
|
| `pnpm run storybook` | Start the storybook documentation |
|
||||||
|
|
||||||
### Storybook
|
### Storybook
|
||||||
|
|
||||||
@@ -98,7 +104,7 @@ pnpm run storybook
|
|||||||
|
|
||||||
> **Note:** Running Storybook from the repository root isn't set up yet. This is a known gap — contributions to add a root-level `pnpm --filter` script are welcome.
|
> **Note:** Running Storybook from the repository root isn't set up yet. This is a known gap — contributions to add a root-level `pnpm --filter` script are welcome.
|
||||||
|
|
||||||
Component and browser tests run inside Docker (`docker-compose.test.yaml`) to guarantee a reproducible browser environment across all contributors and CI — you don't need Playwright browsers installed locally.
|
Component and browser tests run inside Docker (`docker-compose.test.yaml`), based on the same `Dockerfile.test` used to build the image CI tests against, to guarantee a reproducible browser environment — you don't need Playwright browsers installed locally. Locally this image is built on demand; in CI a prebuilt version of the same image is pulled directly (see [ADR-0002](./docs/src/content/docs/architecture/adr/000200-technology-stack.mdx) and the [Technology Architecture](./docs/src/content/docs/architecture/adm/technology-architecture.mdx#66-test-execution-environment) doc for details).
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
@@ -108,4 +114,4 @@ Component and browser tests run inside Docker (`docker-compose.test.yaml`) to gu
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
LUNA Charts is licensed under the [GNU Lesser General Public License v3.0 (LGPL-3.0)](./LICENSE).
|
LUNA Charts is licensed under the [GNU Lesser General Public License v3.0 (LGPL-3.0)](./LICENSE).
|
||||||
@@ -150,19 +150,39 @@ LUNA Charts follows a multi-layer quality assurance model.
|
|||||||
|
|
||||||
### 6.6 Test Execution Environment
|
### 6.6 Test Execution Environment
|
||||||
|
|
||||||
Component and browser tests (Vitest browser mode, see ADR-0002) run inside a **containerized Playwright environment** rather than directly on contributor or CI host machines.
|
Component and browser tests (Vitest browser mode, see ADR-0002) run inside
|
||||||
|
a **containerized Playwright environment** rather than directly on
|
||||||
|
contributor or CI host machines.
|
||||||
|
|
||||||
#### Characteristics
|
#### Characteristics
|
||||||
|
|
||||||
- A dedicated `Dockerfile.test`, based on the official Playwright container image, provides a reproducible browser environment with pinned browser versions
|
- A dedicated `Dockerfile.test`, based on the official Playwright container
|
||||||
- `docker-compose.test.yaml` orchestrates the test execution, isolating dependencies from the host system
|
image, provides a reproducible browser environment with pinned browser
|
||||||
- The same containerized environment is used locally by contributors and in Continuous Integration, avoiding "works on my machine" discrepancies caused by differing local Playwright/browser installations
|
versions
|
||||||
|
- Locally, `docker-compose.test.yaml` builds this image from source and
|
||||||
|
orchestrates test execution, isolating dependencies from the host system
|
||||||
|
- In Continuous Integration, the same `Dockerfile.test` is built and
|
||||||
|
pushed to the project's container registry out-of-band (tagged by
|
||||||
|
Playwright version, e.g. `luna-charts-test:v1.62.1`); CI jobs pull this
|
||||||
|
prebuilt image directly rather than rebuilding it on every run, then
|
||||||
|
check out the current commit and install dependencies inside the running
|
||||||
|
container before executing tests
|
||||||
|
- `Dockerfile.test` remains the single source of truth for the test
|
||||||
|
environment definition in both cases — only *when* the image is built
|
||||||
|
(on demand locally, ahead of time for CI) differs
|
||||||
|
|
||||||
#### Rationale
|
#### Rationale
|
||||||
|
|
||||||
- Ensures deterministic, reproducible accessibility and browser test results independent of the host operating system
|
- Ensures deterministic, reproducible accessibility and browser test
|
||||||
- Removes the need for contributors to install and maintain matching Playwright browser binaries locally
|
results independent of the host operating system
|
||||||
- Aligns automated testing (Section 6.1–6.4) with a single, version-controlled execution environment
|
- Removes the need for contributors to install and maintain matching
|
||||||
|
Playwright browser binaries locally
|
||||||
|
- Avoids rebuilding the Playwright/browser image on every CI run, which
|
||||||
|
would otherwise require Docker-in-Docker access inside the CI runner —
|
||||||
|
significant infrastructure complexity for a single-service image build
|
||||||
|
- Aligns automated testing (Section 6.1–6.4) with a single,
|
||||||
|
version-controlled execution environment definition, even though the
|
||||||
|
build trigger differs between local development and CI
|
||||||
|
|
||||||
## 7. Release & Distribution Model
|
## 7. Release & Distribution Model
|
||||||
|
|
||||||
@@ -255,4 +275,32 @@ Component and browser tests are executed inside a Docker-based Playwright enviro
|
|||||||
|
|
||||||
**Impact**
|
**Impact**
|
||||||
|
|
||||||
This clarifies an already-implemented part of the testing strategy (Section 6) and does not change any other architectural decision in this document.
|
This clarifies an already-implemented part of the testing strategy (Section 6) and does not change any other architectural decision in this document.
|
||||||
|
|
||||||
|
### 2026-08-04 – CI uses a prebuilt test image instead of rebuilding per run
|
||||||
|
|
||||||
|
**Reason**
|
||||||
|
|
||||||
|
The initial implementation of Section 6.6 assumed CI would build
|
||||||
|
`Dockerfile.test` fresh on every run, identical to local execution. In
|
||||||
|
practice, this required Docker-in-Docker access inside the CI runner
|
||||||
|
purely to build a single-service image — disproportionate operational
|
||||||
|
complexity (privileged sidecar container, custom pod networking,
|
||||||
|
runner-level configuration) for the orchestration value actually needed,
|
||||||
|
since `docker-compose.test.yaml` defines only one service with no
|
||||||
|
inter-service dependencies.
|
||||||
|
|
||||||
|
**Changes**
|
||||||
|
|
||||||
|
- Section 6.6 updated to describe the actual CI flow: `Dockerfile.test` is
|
||||||
|
built and pushed to the registry out-of-band (not on every CI run), and
|
||||||
|
CI jobs pull the prebuilt image, then check out the current commit and
|
||||||
|
install dependencies at runtime
|
||||||
|
- Clarified that `Dockerfile.test` remains the single source of truth for
|
||||||
|
the test environment definition; only the build trigger differs between
|
||||||
|
local and CI usage
|
||||||
|
|
||||||
|
**Impact**
|
||||||
|
|
||||||
|
No other architectural decision in this document is affected. Local
|
||||||
|
component testing (`pnpm test:component`) is unchanged.
|
||||||
@@ -235,4 +235,90 @@ During implementation, Jest was replaced with Vitest as the unit testing tool. S
|
|||||||
|
|
||||||
**Impact**
|
**Impact**
|
||||||
|
|
||||||
Playwright remains part of the technology stack, but its architectural role changes from an independent browser test runner to the browser engine used by Vitest. No other decisions in this ADR are affected.
|
Playwright remains part of the technology stack, but its architectural role changes from an independent browser test runner to the browser engine used by Vitest. No other decisions in this ADR are affected.
|
||||||
|
|
||||||
|
### 2026-08-03 – Continuous Integration: GitHub Actions replaced with Gitea Actions
|
||||||
|
|
||||||
|
**Reason**
|
||||||
|
|
||||||
|
During implementation, the project moved to a self-hosted Gitea instance
|
||||||
|
with Gitea Actions (`act_runner`) instead of GitHub Actions. The ADR's
|
||||||
|
"Considered Alternatives" and "Decision" tables still listed GitHub
|
||||||
|
Actions, which no longer matched the actual CI/CD tooling in use.
|
||||||
|
|
||||||
|
**Changes**
|
||||||
|
|
||||||
|
- "Considered Alternatives" table: `Continuous Integration` row updated —
|
||||||
|
considered alternatives changed to *GitHub Actions, GitLab CI, Azure
|
||||||
|
Pipelines, Gitea Actions*; selected technology changed to **Gitea
|
||||||
|
Actions**
|
||||||
|
- "Decision" table: **GitHub Actions** entry replaced with **Gitea
|
||||||
|
Actions**
|
||||||
|
- "Rationale" section: `GitHub Actions` subsection replaced with `Gitea
|
||||||
|
Actions`, noting that workflows run on a self-hosted `act_runner`
|
||||||
|
(Docker-in-Docker mode) against the project's own Gitea instance
|
||||||
|
|
||||||
|
**Impact**
|
||||||
|
|
||||||
|
Only the Continuous Integration technology choice is affected. Workflow
|
||||||
|
syntax remains GitHub-Actions-compatible (Gitea Actions is designed to be
|
||||||
|
largely compatible with the GitHub Actions workflow format), so no other
|
||||||
|
architectural decisions in this ADR are impacted.
|
||||||
|
|
||||||
|
### 2026-08-04 – Component test CI execution: prebuilt image instead of Docker-in-Docker
|
||||||
|
|
||||||
|
**Reason**
|
||||||
|
|
||||||
|
Component tests run inside a container built from `Dockerfile.test`
|
||||||
|
(based on the official Playwright image). Running this build step inside
|
||||||
|
every CI job would require Docker-in-Docker (DinD) access on the
|
||||||
|
self-hosted Gitea Actions runner — a privileged sidecar container, custom
|
||||||
|
pod networking, and runner-level configuration — solely to build a
|
||||||
|
single-service image with no inter-service orchestration need.
|
||||||
|
|
||||||
|
**Considered Alternatives**
|
||||||
|
|
||||||
|
| Alternative | Description |
|
||||||
|
| ----------- | ----------- |
|
||||||
|
| Build `Dockerfile.test` fresh on every CI run (DinD) | Mirrors the local `docker compose up --build` flow exactly inside a DinD-enabled CI job. |
|
||||||
|
| Replicate `Dockerfile.test`'s steps directly as CI workflow steps, using the public Playwright image | Avoids Docker entirely in CI, but duplicates the test environment definition in two places (`Dockerfile.test` and the workflow YAML), risking drift between local and CI environments. |
|
||||||
|
| **Build and push `Dockerfile.test` out-of-band, pull the prebuilt image in CI (selected)** | `Dockerfile.test` remains the only definition of the test environment; the resulting image is built and pushed to the registry separately (tagged by Playwright version), and CI jobs simply pull it and run tests — no Docker access needed at test time. |
|
||||||
|
|
||||||
|
Building fresh on every run was rejected due to the disproportionate DinD
|
||||||
|
infrastructure complexity for a single-service build. Replicating the
|
||||||
|
steps in the workflow file was rejected because it reintroduces a second,
|
||||||
|
manually-synchronized source of truth for the test environment.
|
||||||
|
|
||||||
|
**Decision**
|
||||||
|
|
||||||
|
`Dockerfile.test` is built and pushed to the project's container registry
|
||||||
|
out-of-band (not as part of the CI pipeline), tagged by Playwright
|
||||||
|
version (e.g. `luna-charts-test:v1.62.1`). The `component-tests` CI job
|
||||||
|
pulls this prebuilt image directly, checks out the current commit, and
|
||||||
|
runs the test command — no Docker access is required inside the CI job
|
||||||
|
container.
|
||||||
|
|
||||||
|
**Consequences**
|
||||||
|
|
||||||
|
*Positive*
|
||||||
|
|
||||||
|
- `Dockerfile.test` remains the single source of truth for the test
|
||||||
|
environment definition
|
||||||
|
- No Docker-in-Docker, privileged containers, or custom pod networking
|
||||||
|
required in the CI job itself
|
||||||
|
- Faster, simpler `component-tests` job
|
||||||
|
|
||||||
|
*Negative*
|
||||||
|
|
||||||
|
- The test image must be rebuilt and pushed manually (or via a separate,
|
||||||
|
intentionally-triggered process) whenever `Dockerfile.test` changes;
|
||||||
|
forgetting this step means CI runs against a stale image
|
||||||
|
- This is considered an acceptable trade-off given how infrequently
|
||||||
|
`Dockerfile.test` changes, versus the ongoing operational cost of
|
||||||
|
maintaining DinD access in the runner
|
||||||
|
|
||||||
|
**Impact**
|
||||||
|
|
||||||
|
Local component testing (`pnpm test:component` via Docker Compose) is
|
||||||
|
unaffected — it continues to build `Dockerfile.test` fresh via
|
||||||
|
`docker-compose.test.yaml`. Only the CI-side image sourcing changes.
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
"changeset": "changeset",
|
"changeset": "changeset",
|
||||||
"version": "changeset version",
|
"version": "changeset version",
|
||||||
"release": "changeset publish",
|
"release": "changeset publish",
|
||||||
|
"storybook": "pnpm --filter luna-charts run storybook",
|
||||||
"test:unit": "pnpm --filter luna-charts test:unit",
|
"test:unit": "pnpm --filter luna-charts test:unit",
|
||||||
"test:component": "docker compose -f docker-compose.test.yaml up --build --abort-on-container-exit --exit-code-from test",
|
"test:component": "docker compose -f docker-compose.test.yaml up --build --abort-on-container-exit --exit-code-from test",
|
||||||
"test": "pnpm test:unit && pnpm test:component"
|
"test": "pnpm test:unit && pnpm test:component"
|
||||||
|
|||||||
Reference in New Issue
Block a user