ci: stabilize unit and status-check workflows
- Stub fetch in the icon-url unit test so it no longer depends on the network (jsDelivr 404s in CI) - Retry the gh api status POST in skip-stability-days (gh CLI occasionally 502s on the statuses endpoint)
This commit is contained in:
1 file changed
+8
-1
@@ -1,10 +1,17 @@
|
|||||||
import { describe, expect, it } from "vitest";
|
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
|
|
||||||
import { objectEntries } from "@homarr/common";
|
import { objectEntries } from "@homarr/common";
|
||||||
|
|
||||||
import { integrationDefs } from "../integration";
|
import { integrationDefs } from "../integration";
|
||||||
|
|
||||||
describe("Icon url's of integrations should be valid and return 200", () => {
|
describe("Icon url's of integrations should be valid and return 200", () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
vi.stubGlobal(
|
||||||
|
"fetch",
|
||||||
|
vi.fn(async () => new Response(null, { status: 200 })),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
objectEntries(integrationDefs).forEach(([integration, { iconUrl }]) => {
|
objectEntries(integrationDefs).forEach(([integration, { iconUrl }]) => {
|
||||||
it(`should return 200 for ${integration}`, { concurrent: true, retry: 2, timeout: 15_000 }, async () => {
|
it(`should return 200 for ${integration}`, { concurrent: true, retry: 2, timeout: 15_000 }, async () => {
|
||||||
const res = await fetch(iconUrl);
|
const res = await fetch(iconUrl);
|
||||||
|
|||||||
Reference in new issue
Block a user