Skip to content

Commit

Permalink
fix: ci and test
Browse files Browse the repository at this point in the history
  • Loading branch information
rin-yato committed Apr 15, 2024
1 parent 0f32b75 commit e58b315
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 5 deletions.
9 changes: 9 additions & 0 deletions gui/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
rootDir: "./",
moduleNameMapper: {
"^@gui/(.*)$": "<rootDir>/src/$1",
},
};
8 changes: 7 additions & 1 deletion gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"scripts": {
"dev": "tsup --watch",
"build": "tsup",
"staged": "pnpm run typecheck && pnpm run format && pnpm run lint && pnpm run test",
"typecheck": "tsc --noEmit",
"test": "jest",
"test:watch": "jest --watch",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --check .",
Expand Down Expand Up @@ -76,15 +79,18 @@
"devDependencies": {
"@libsqlstudio/tailwind": "workspace:*",
"@libsqlstudio/tsconfig": "workspace:*",
"eslint-config-libsqlstudio": "workspace:*",
"@types/deep-equal": "^1.0.4",
"@types/jest": "^29.5.11",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.19",
"eslint-config-libsqlstudio": "workspace:*",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"ts-jest": "^29.1.2",
"tsup": "^8.0.2",
"vite": "^5.2.0",
"vite-tsconfig-paths": "^4.3.2"
Expand Down
9 changes: 8 additions & 1 deletion gui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
},
"noImplicitReturns": false
},
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs", "*.js", "*.ts"],
"include": [
"**/*.ts",
"**/*.tsx",
".eslintrc.cjs",
"*.js",
"*.ts",
"jest.config.cjs"
],
"exclude": ["node_modules", "dist"]
}
55 changes: 55 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": false,
"scripts": {
"dev": "next dev --turbo",
"build": "npm run db:migrate && next build",
"build": "pnpm run db:migrate && next build",
"start": "next start",
"tsc": "tsc --noEmit --skipLibCheck",
"test": "jest",
Expand All @@ -13,7 +13,7 @@
"db:generate": "drizzle-kit generate:sqlite",
"db:migrate": "tsx src/db/migrate.ts",
"generate-random-key": "tsx src/cli/generate-aes-key.ts",
"staged": "npm run tsc && npm run lint && jest",
"staged": "pnpm run typecheck && pnpm run lint && jest",
"typecheck": "tsc --noEmit --skipLibCheck",
"format": "prettier --check .",
"format:fix": "prettier --write .",
Expand Down
8 changes: 7 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
"test": { "cache": true },
"test:watch": { "persistent": true, "cache": false },
"staged": {
"dependsOn": ["^format", "^lint", "^typecheck", "^test"]
"dependsOn": [
"@libsqlstudio/gui#build",
"^format",
"^lint",
"^typecheck",
"^test"
]
}
}
}

0 comments on commit e58b315

Please sign in to comment.