fix(ci): restore custom widget checks

This commit is contained in:
Thomas Camlong committed 2026-07-18 17:14:10 +02:00
1 parent eae48f50fd
commit a31a8fd4dd
5 files changed
+46 -92

No files matched your search

+12
View File
@@ -312,6 +312,18 @@ jobs:
"${PREVIEW_IMAGE}@${AMD64_DIGEST}" \ "${PREVIEW_IMAGE}@${AMD64_DIGEST}" \
"${PREVIEW_IMAGE}@${ARM64_DIGEST}" "${PREVIEW_IMAGE}@${ARM64_DIGEST}"
- name: Verify preview manifest platforms
if: "!env.ACT"
run: |
image="${PREVIEW_IMAGE}:${PREVIEW_TAG}"
manifest="$(docker buildx imagetools inspect "$image" --raw)"
for architecture in amd64 arm64; do
jq --exit-status --arg architecture "$architecture" \
'any(.manifests[]; .platform.os == "linux" and .platform.architecture == $architecture)' \
<<<"$manifest" >/dev/null
done
docker buildx imagetools inspect "$image"
cleanup: cleanup:
name: Clean up preview image name: Clean up preview image
if: github.event_name == 'pull_request_target' || (github.event_name == 'workflow_dispatch' && inputs.operation == 'cleanup') if: github.event_name == 'pull_request_target' || (github.event_name == 'workflow_dispatch' && inputs.operation == 'cleanup')
@@ -106,6 +106,6 @@ The advanced deployments environment variables should only be used if you know w
::: :::
| Environment Variable | Description | | Environment Variable | Description |
| ------------------------ | -------------------------------------------------- | | ------------------------------ | --------------------------------------------------------------------------------------------------------------- |
| `DB_MIGRATIONS_DISABLED` | Disable db migrations. For example for helm charts | | `DB_MIGRATIONS_DISABLED` | Disable db migrations. For example for helm charts |
| `NEXT_PUBLIC_WORKSHOP_API_URL` | Build-time public origin for a separately hosted Workshop PocketBase service. Defaults to `https://homarr.dev`. | | `NEXT_PUBLIC_WORKSHOP_API_URL` | Build-time public origin for a separately hosted Workshop PocketBase service. Defaults to `https://homarr.dev`. |
+1 -2
View File
@@ -6,13 +6,12 @@ ENV COREPACK_HOME=/corepack
RUN mkdir -p /corepack && corepack enable pnpm && corepack install --global pnpm@11.11.0 RUN mkdir -p /corepack && corepack enable pnpm && corepack install --global pnpm@11.11.0
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json turbo.json ./ COPY pnpm-lock.yaml pnpm-workspace.yaml package.json turbo.json ./
COPY patches ./patches COPY patches ./patches
RUN --mount=type=cache,id=workshop-pnpm-store,target=/pnpm/store pnpm config set store-dir /pnpm/store && pnpm fetch --ignore-scripts
COPY apps/docs ./apps/docs COPY apps/docs ./apps/docs
COPY packages/custom-widgets ./packages/custom-widgets COPY packages/custom-widgets ./packages/custom-widgets
COPY packages/definitions ./packages/definitions COPY packages/definitions ./packages/definitions
COPY packages/workshop ./packages/workshop COPY packages/workshop ./packages/workshop
COPY tooling/typescript ./tooling/typescript COPY tooling/typescript ./tooling/typescript
RUN --mount=type=cache,id=workshop-pnpm-store,target=/pnpm/store pnpm install --recursive --offline --frozen-lockfile RUN --mount=type=cache,id=workshop-pnpm-store,target=/pnpm/store pnpm config set store-dir /pnpm/store && pnpm install --filter @homarr/docs... --frozen-lockfile
FROM dependencies AS website FROM dependencies AS website
RUN CI=true SKIP_ENV_VALIDATION=true pnpm turbo build --filter=@homarr/docs RUN CI=true SKIP_ENV_VALIDATION=true pnpm turbo build --filter=@homarr/docs
@@ -6862,16 +6862,8 @@
"width", "width",
"wrapperProps" "wrapperProps"
], ],
"Chip.Group": [ "Chip.Group": ["defaultValue", "multiple", "value"],
"defaultValue", "ChipGroup": ["defaultValue", "multiple", "value"],
"multiple",
"value"
],
"ChipGroup": [
"defaultValue",
"multiple",
"value"
],
"CloseButton": [ "CloseButton": [
"attributes", "attributes",
"bd", "bd",
@@ -8171,10 +8163,7 @@
"vocab", "vocab",
"w" "w"
], ],
"CopyButton": [ "CopyButton": ["timeout", "value"],
"timeout",
"value"
],
"DataList": [ "DataList": [
"about", "about",
"accessKey", "accessKey",
@@ -12187,10 +12176,7 @@
"withOverlay", "withOverlay",
"withRoles" "withRoles"
], ],
"HoverCard.Target": [ "HoverCard.Target": ["eventPropsWrapperName", "popupType"],
"eventPropsWrapperName",
"popupType"
],
"HoverCard.Dropdown": [ "HoverCard.Dropdown": [
"about", "about",
"accessKey", "accessKey",
@@ -12346,10 +12332,7 @@
"vocab", "vocab",
"w" "w"
], ],
"HoverCard.Group": [ "HoverCard.Group": ["closeDelay", "openDelay"],
"closeDelay",
"openDelay"
],
"HoverCardDropdown": [ "HoverCardDropdown": [
"about", "about",
"accessKey", "accessKey",
@@ -12505,14 +12488,8 @@
"vocab", "vocab",
"w" "w"
], ],
"HoverCardGroup": [ "HoverCardGroup": ["closeDelay", "openDelay"],
"closeDelay", "HoverCardTarget": ["eventPropsWrapperName", "popupType"],
"openDelay"
],
"HoverCardTarget": [
"eventPropsWrapperName",
"popupType"
],
"HueSlider": [ "HueSlider": [
"about", "about",
"accessKey", "accessKey",
@@ -15762,10 +15739,7 @@
"vocab", "vocab",
"w" "w"
], ],
"Menu.CheckboxGroup": [ "Menu.CheckboxGroup": ["defaultValue", "value"],
"defaultValue",
"value"
],
"Menu.RadioItem": [ "Menu.RadioItem": [
"about", "about",
"accessKey", "accessKey",
@@ -15930,18 +15904,9 @@
"vocab", "vocab",
"w" "w"
], ],
"Menu.RadioGroup": [ "Menu.RadioGroup": ["defaultValue", "value"],
"defaultValue", "Menu.ContextMenu": ["disabled", "longPressDelay"],
"value" "MenuCheckboxGroup": ["defaultValue", "value"],
],
"Menu.ContextMenu": [
"disabled",
"longPressDelay"
],
"MenuCheckboxGroup": [
"defaultValue",
"value"
],
"MenuCheckboxItem": [ "MenuCheckboxItem": [
"about", "about",
"accessKey", "accessKey",
@@ -16106,10 +16071,7 @@
"vocab", "vocab",
"w" "w"
], ],
"MenuContextMenu": [ "MenuContextMenu": ["disabled", "longPressDelay"],
"disabled",
"longPressDelay"
],
"MenuDivider": [ "MenuDivider": [
"about", "about",
"accessKey", "accessKey",
@@ -16638,10 +16600,7 @@
"vocab", "vocab",
"w" "w"
], ],
"MenuRadioGroup": [ "MenuRadioGroup": ["defaultValue", "value"],
"defaultValue",
"value"
],
"MenuRadioItem": [ "MenuRadioItem": [
"about", "about",
"accessKey", "accessKey",
@@ -21530,10 +21489,7 @@
"withOverlay", "withOverlay",
"withRoles" "withRoles"
], ],
"Popover.Target": [ "Popover.Target": ["key", "popupType"],
"key",
"popupType"
],
"Popover.Dropdown": [ "Popover.Dropdown": [
"about", "about",
"accessKey", "accessKey",
@@ -21689,14 +21645,8 @@
"vocab", "vocab",
"w" "w"
], ],
"Popover.ContextMenu": [ "Popover.ContextMenu": ["disabled", "longPressDelay"],
"disabled", "PopoverContextMenu": ["disabled", "longPressDelay"],
"longPressDelay"
],
"PopoverContextMenu": [
"disabled",
"longPressDelay"
],
"PopoverDropdown": [ "PopoverDropdown": [
"about", "about",
"accessKey", "accessKey",
@@ -21852,10 +21802,7 @@
"vocab", "vocab",
"w" "w"
], ],
"PopoverTarget": [ "PopoverTarget": ["key", "popupType"],
"key",
"popupType"
],
"Progress": [ "Progress": [
"about", "about",
"accessKey", "accessKey",
@@ -30320,9 +30267,7 @@
"vocab", "vocab",
"w" "w"
], ],
"Table.DataRenderer": [ "Table.DataRenderer": ["data"],
"data"
],
"TableCaption": [ "TableCaption": [
"about", "about",
"accessKey", "accessKey",
@@ -34705,10 +34650,7 @@
"vocab", "vocab",
"w" "w"
], ],
"Tooltip.Group": [ "Tooltip.Group": ["closeDelay", "openDelay"],
"closeDelay",
"openDelay"
],
"TooltipFloating": [ "TooltipFloating": [
"about", "about",
"accessKey", "accessKey",
@@ -34872,10 +34814,7 @@
"vocab", "vocab",
"w" "w"
], ],
"TooltipGroup": [ "TooltipGroup": ["closeDelay", "openDelay"],
"closeDelay",
"openDelay"
],
"Tree": [ "Tree": [
"about", "about",
"accessKey", "accessKey",
@@ -39832,12 +39771,7 @@
"withSuccessStyles", "withSuccessStyles",
"wrapperProps" "wrapperProps"
], ],
"TimeValue": [ "TimeValue": ["amPmLabels", "format", "value", "withSeconds"],
"amPmLabels",
"format",
"value",
"withSeconds"
],
"WeekdaysRow": [ "WeekdaysRow": [
"about", "about",
"accessKey", "accessKey",
+11 -2
View File
@@ -6,10 +6,17 @@ import { createLanguageMapping } from "@homarr/translation";
import { widgetImports } from ".."; import { widgetImports } from "..";
const doesOptionRenderTranslatedCopy = (option: unknown) => {
if (typeof option !== "object" || option === null || !("type" in option)) return false;
return option.type !== "internal" && option.type !== "customWidgetConfiguration";
};
describe("Widget properties with description should have matching translations", async () => { describe("Widget properties with description should have matching translations", async () => {
const enTranslation = await createLanguageMapping().en(); const enTranslation = await createLanguageMapping().en();
objectEntries(widgetImports).forEach(([key, value]) => { objectEntries(widgetImports).forEach(([key, value]) => {
Object.entries(value.definition.createOptions({} as SettingsContextProps)).forEach(([optionKey, optionValue_]) => { Object.entries(value.definition.createOptions({} as SettingsContextProps))
.filter(([, option]) => doesOptionRenderTranslatedCopy(option))
.forEach(([optionKey, optionValue_]) => {
const optionValue = optionValue_ as { withDescription: boolean }; const optionValue = optionValue_ as { withDescription: boolean };
it(`should have matching translations for ${optionKey} option description of ${key} widget`, () => { it(`should have matching translations for ${optionKey} option description of ${key} widget`, () => {
const option = enTranslation.default.widget[key].option; const option = enTranslation.default.widget[key].option;
@@ -27,7 +34,9 @@ describe("Widget properties with description should have matching translations",
describe("Widget properties should have matching name translations", async () => { describe("Widget properties should have matching name translations", async () => {
const enTranslation = await createLanguageMapping().en(); const enTranslation = await createLanguageMapping().en();
objectEntries(widgetImports).forEach(([key, value]) => { objectEntries(widgetImports).forEach(([key, value]) => {
Object.keys(value.definition.createOptions({} as SettingsContextProps)).forEach((optionKey) => { Object.entries(value.definition.createOptions({} as SettingsContextProps))
.filter(([, option]) => doesOptionRenderTranslatedCopy(option))
.forEach(([optionKey]) => {
it(`should have matching translations for ${optionKey} option name of ${key} widget`, () => { it(`should have matching translations for ${optionKey} option name of ${key} widget`, () => {
const option = enTranslation.default.widget[key].option; const option = enTranslation.default.widget[key].option;
if (!(optionKey in option)) { if (!(optionKey in option)) {