Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,26 @@ jobs:

- name: Run tests for backend
run: yarn test

build-amd64:
runs-on: self-hosted
needs: test
if: ${{ needs.test.result == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2


- name: Build Docker Image (amd64)
uses: docker/build-push-action@v4
with:
context: ./
push: false
platforms: linux/amd64
build-args: |
VERSION_ARG=${{ github.ref_name }}
tags: |
quickstack/quickstack:test-amd64
4 changes: 2 additions & 2 deletions src/app/settings/server/qs-version-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { Rocket, ExternalLink } from "lucide-react";
import { Label } from "@/components/ui/label"
import { Switch } from "@/components/ui/switch"
import React from "react";
import { GithubReleaseInfo } from "@/server/adapter/github.adapter";
import Link from "next/link";
import { QuickStackReleaseInfo } from "@/server/adapter/qs-versioninfo.adapter";

export default function QuickStackVersionInfo({
useCanaryChannel,
Expand All @@ -19,7 +19,7 @@ export default function QuickStackVersionInfo({
}: {
useCanaryChannel: boolean;
currentVersion?: string;
newVersionInfo?: GithubReleaseInfo
newVersionInfo?: QuickStackReleaseInfo
}) {

const useConfirm = useConfirmDialog();
Expand Down
4 changes: 2 additions & 2 deletions src/app/sidebar-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { useRouter } from "next/router"
import { useEffect, useState } from "react"
import QuickStackLogo from "@/components/custom/quickstack-logo"
import { UserGroupUtils } from "@/shared/utils/role.utils"
import { GithubReleaseInfo } from "@/server/adapter/github.adapter"
import { QuickStackReleaseInfo } from "@/server/adapter/qs-versioninfo.adapter"

export function SidebarCient({
projects,
Expand All @@ -41,7 +41,7 @@ export function SidebarCient({
}: {
projects: (Project & { apps: App[] })[];
session: UserSession;
newVersionInfo?: GithubReleaseInfo;
newVersionInfo?: QuickStackReleaseInfo;
}) {

const path = usePathname();
Expand Down
2 changes: 1 addition & 1 deletion src/server/adapter/registry-api.adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class RegistryApiAdapter {
});

await this.checkIfResponseIsOk(response);
const data = await response.json();
const data = await response.json() as { repositories: string[] } | null;
return data?.repositories ?? [] as string[];
}

Expand Down
4 changes: 0 additions & 4 deletions src/server/services/upgrade-services/k3s-update.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import { unstable_cache } from "next/cache";
import quickStackService from "../qs.service";
import { githubAdapter } from "../../adapter/github.adapter";
import { Tags } from "../../utils/cache-tag-generator.utils";
import k3s from "../../adapter/kubernetes-api.adapter";
import namespaceService from "../namespace.service";
import * as k8s from '@kubernetes/client-node';
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.server.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"module": "commonjs",
"outDir": "dist",
"lib": [
"ES2023"
"dom",
"dom.iterable",
"esnext"
],
"target": "ES2023",
"isolatedModules": false,
Expand Down
14 changes: 9 additions & 5 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,16 @@ export default defineConfig({
},
test: {
globals: true,
environment: 'jsdom',
environmentMatchGlobs: [
['src/__tests__/integration/**', 'node'],
['src/server/**', 'node'],
projects: [
{
extends: true,
test: {
name: 'jsdom',
environment: 'jsdom',
include: ['src/**/*.spec.ts', 'src/**/*.test.ts'],
},
},
],
include: ['src/**/*.spec.ts', 'src/**/*.test.ts'],
coverage: {
provider: 'v8',
reportsDirectory: 'coverage',
Expand Down
Loading