diff --git a/.github/workflows/bun-tests.yml b/.github/workflows/bun-tests.yml new file mode 100644 index 0000000..966524d --- /dev/null +++ b/.github/workflows/bun-tests.yml @@ -0,0 +1,22 @@ +name: Run Bun Tests + +on: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.1.27 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Run tests + run: bun test diff --git a/bun.lockb b/bun.lockb index 42e682b..455a674 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 4fdea1f..ca40ac5 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "workspaces": [ "apps/*", "packages/*", - "tooling/*" + "tooling/*", + "test" ], "scripts": { "__BUILD_____________": "", diff --git a/test/README.md b/test/README.md new file mode 100644 index 0000000..f3229c5 --- /dev/null +++ b/test/README.md @@ -0,0 +1 @@ +.. diff --git a/test/eslint.config.js b/test/eslint.config.js new file mode 100644 index 0000000..87bed57 --- /dev/null +++ b/test/eslint.config.js @@ -0,0 +1,13 @@ +import baseConfig from "@good-dog/eslint/base"; +import nextjsConfig from "@good-dog/eslint/nextjs"; +import reactConfig from "@good-dog/eslint/react"; + +/** @type {import('typescript-eslint').Config} */ +export default [ + { + ignores: [], + }, + ...baseConfig, + ...nextjsConfig, + ...reactConfig, +]; diff --git a/test/example.test.ts b/test/example.test.ts new file mode 100644 index 0000000..88f8dd7 --- /dev/null +++ b/test/example.test.ts @@ -0,0 +1,5 @@ +import { expect, test } from "bun:test"; + +test("2 + 2", () => { + expect(2 + 2).toBe(4); +}); diff --git a/test/index.ts b/test/index.ts new file mode 100644 index 0000000..469a025 --- /dev/null +++ b/test/index.ts @@ -0,0 +1 @@ +export const name = "test"; diff --git a/test/package.json b/test/package.json new file mode 100644 index 0000000..44f3622 --- /dev/null +++ b/test/package.json @@ -0,0 +1,23 @@ +{ + "name": "@good-dog/test", + "private": true, + "version": "0.1.0", + "type": "module", + "license": "MIT", + "scripts": { + "clean": "rm -rf .turbo node_modules", + "format": "prettier --check . --ignore-path ../.gitignore", + "lint": "eslint", + "typecheck": "tsc --noEmit --emitDeclarationOnly false" + }, + "devDependencies": { + "@good-dog/eslint": "workspace:*", + "@good-dog/prettier": "workspace:*", + "@good-dog/typescript": "workspace:*", + "@types/bun": "^1.1.10", + "eslint": "9.10.0", + "prettier": "3.2.5", + "typescript": "5.4.5" + }, + "prettier": "@good-dog/prettier" +} diff --git a/test/tsconfig.json b/test/tsconfig.json new file mode 100644 index 0000000..ab93ae9 --- /dev/null +++ b/test/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@good-dog/typescript/base.json", + "compilerOptions": { + "tsBuildInfoFile": "node_modules/.cache/tsbuildinfo.json" + }, + "include": ["**/*.test.ts", "*.ts"], + "exclude": ["node_modules"] +}