mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-24 08:01:56 -05:00
test: update vitest config
This commit is contained in:
67
.github/workflows/adapter-tests.yml
vendored
67
.github/workflows/adapter-tests.yml
vendored
@@ -1,67 +0,0 @@
|
||||
name: Adapter Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- canary
|
||||
merge_group:
|
||||
|
||||
jobs:
|
||||
test-adapters:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
node-version: [22.x, 24.x, 25.x]
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Cache turbo build setup
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
||||
with:
|
||||
path: .turbo
|
||||
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-turbo-
|
||||
|
||||
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
|
||||
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
cache: pnpm
|
||||
|
||||
- name: Install
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ vars.TURBO_TEAM || github.repository_owner }}
|
||||
TURBO_CACHE: remote:rw
|
||||
run: pnpm build
|
||||
|
||||
- name: Start Docker Containers
|
||||
run: |
|
||||
docker compose up -d
|
||||
# Wait for services to be ready
|
||||
sleep 10
|
||||
|
||||
- name: Test Adapters
|
||||
working-directory: packages/better-auth
|
||||
env:
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
TURBO_TEAM: ${{ vars.TURBO_TEAM || github.repository_owner }}
|
||||
run: pnpm test:adapters
|
||||
|
||||
- name: Stop Docker Containers
|
||||
run: docker compose down
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"release:no-build": "bumpp && pnpm -r publish --access public --no-git-checks --tag next",
|
||||
"release:canary": "turbo --filter \"./packages/*\" build && bumpp && pnpm -r publish --access public --tag canary --no-git-checks",
|
||||
"bump": "bumpp",
|
||||
"test": "turbo --filter \"./packages/*\" --filter \"./test\" test --continue",
|
||||
"test": "vitest",
|
||||
"e2e:smoke": "turbo --filter \"./e2e/*\" e2e:smoke",
|
||||
"e2e:integration": "turbo --filter \"./e2e/*\" e2e:integration",
|
||||
"typecheck": "tsc --build"
|
||||
|
||||
@@ -2,6 +2,7 @@ import { defineProject } from "vitest/config";
|
||||
|
||||
export default defineProject({
|
||||
test: {
|
||||
name: "better-auth-adapter",
|
||||
execArgv: ["--expose-gc"],
|
||||
// No exclude for adapter tests - this config is specifically for adapter tests
|
||||
include: ["src/adapters/**/*.test.ts"],
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
},
|
||||
"//#format": {},
|
||||
"lint": {},
|
||||
"test": {
|
||||
"dependsOn": ["build"]
|
||||
},
|
||||
"e2e:smoke": {
|
||||
"dependsOn": ["build"]
|
||||
},
|
||||
|
||||
@@ -2,7 +2,11 @@ import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
projects: ["./packages/*", "./test"],
|
||||
projects: [
|
||||
"./packages/*",
|
||||
"./test",
|
||||
"./packages/better-auth/vitest.config.adapters.ts",
|
||||
],
|
||||
},
|
||||
ssr: {
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user