rcgit

/ karakeep

Commit eb0d8215

SHA eb0d82159060ff8c278172d01725076a9eef30c0
Author Mohamed Bassem <me at mbassem dot com>
Author Date 2025-01-02 15:25 +0200
Committer GitHub <noreply at github dot com>
Commit Date 2025-01-02 15:25 +0200
Parent(s) 39358b1517a0 (diff)
Tree 3e91a26863a1

patch snapshot

Revert "ci: Run tests on push (#807)" (#808)
This reverts commit 39358b1517a06b90b9886a648ce1c595d1556c8e.
File + - Graph
M .github/workflows/ci.yml +0 -10
M apps/web/package.json +1 -0
M package.json +1 -2
M packages/db/drizzle.ts +1 -1
M packages/shared/package.json +1 -2
M packages/trpc/package.json +1 -2
M packages/trpc/testUtils.ts +0 -2
M turbo.json +0 -1
8 file(s) changed, 5 insertions(+), 20 deletions(-)

.github/workflows/ci.yml

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 127c7990..8216c7cf 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,16 +48,6 @@ jobs:
 
       - name: Typecheck
         run: pnpm typecheck
-  tests:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-
-      - name: Setup
-        uses: ./tooling/github/setup
-
-      - name: Tests
-        run: pnpm test
   open-api-spec:
     runs-on: ubuntu-latest
     steps:

apps/web/package.json

diff --git a/apps/web/package.json b/apps/web/package.json
index d78b1d4d..ec0a3bd2 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -10,6 +10,7 @@
     "build": "next build",
     "start": "next start",
     "lint": "next lint",
+    "test": "vitest",
     "typecheck": "tsc --noEmit",
     "format": "prettier --check . --ignore-path ../../.gitignore",
     "format:fix": "prettier --write . --ignore-path ../../.gitignore",

package.json

diff --git a/package.json b/package.json
index c9ad5633..66bfbaee 100644
--- a/package.json
+++ b/package.json
@@ -19,8 +19,7 @@
     "lint:fix": "turbo --no-daemon lint --continue -- --fix --cache-location node_modules/.cache/.eslintcache",
     "lint:ws": "pnpm dlx sherif@latest",
     "postinstall": "pnpm lint:ws",
-    "typecheck": "turbo --no-daemon typecheck",
-    "test": "turbo --no-daemon test --continue"
+    "typecheck": "turbo --no-daemon typecheck"
   },
   "devDependencies": {
     "@hoarder/prettier-config": "workspace:^0.1.0",

packages/db/drizzle.ts

diff --git a/packages/db/drizzle.ts b/packages/db/drizzle.ts
index 037f7c35..4763d9d7 100644
--- a/packages/db/drizzle.ts
+++ b/packages/db/drizzle.ts
@@ -12,7 +12,7 @@ export const db = drizzle(sqlite, { schema });
 
 export function getInMemoryDB(runMigrations: boolean) {
   const mem = new Database(":memory:");
-  const db = drizzle(mem, { schema, logger: false });
+  const db = drizzle(mem, { schema, logger: true });
   if (runMigrations) {
     migrate(db, { migrationsFolder: path.resolve(__dirname, "./drizzle") });
   }

packages/shared/package.json

diff --git a/packages/shared/package.json b/packages/shared/package.json
index b5a001b9..93d5495a 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -26,8 +26,7 @@
     "format:fix": "prettier . --write --ignore-path ../../.prettierignore",
     "lint": "eslint .",
     "lint:fix": "eslint . --fix",
-    "test": "vitest run",
-    "test:watch": "vitest"
+    "test": "vitest"
   },
   "main": "index.ts",
   "eslintConfig": {

packages/trpc/package.json

diff --git a/packages/trpc/package.json b/packages/trpc/package.json
index 00652b8d..0e1721f1 100644
--- a/packages/trpc/package.json
+++ b/packages/trpc/package.json
@@ -10,8 +10,7 @@
     "format:fix": "prettier . --write --ignore-path ../../.prettierignore",
     "lint": "eslint .",
     "lint:fix": "eslint . --fix",
-    "test": "vitest run",
-    "test:watch": "vitest"
+    "test": "vitest"
   },
   "dependencies": {
     "@hoarder/db": "workspace:*",

packages/trpc/testUtils.ts

diff --git a/packages/trpc/testUtils.ts b/packages/trpc/testUtils.ts
index 6d7e6dee..23dcdb33 100644
--- a/packages/trpc/testUtils.ts
+++ b/packages/trpc/testUtils.ts
@@ -1,6 +1,5 @@
 import { getInMemoryDB } from "@hoarder/db/drizzle";
 import { users } from "@hoarder/db/schema";
-import { runQueueDBMigrations } from "@hoarder/shared/queues";
 
 import { createCallerFactory } from "./index";
 import { appRouter } from "./routers/_app";
@@ -55,7 +54,6 @@ export interface CustomTestContext {
 export async function buildTestContext(
   seedDB: boolean,
 ): Promise<CustomTestContext> {
-  runQueueDBMigrations();
   const db = getTestDB();
   let users: Awaited<ReturnType<typeof seedUsers>> = [];
   if (seedDB) {

turbo.json

diff --git a/turbo.json b/turbo.json
index 7256d8e2..3422151b 100644
--- a/turbo.json
+++ b/turbo.json
@@ -48,7 +48,6 @@
         "node_modules/.cache/tsbuildinfo.json"
       ]
     },
-    "test": {},
     "clean": {
       "cache": false
     },