Split the tests

This commit is contained in:
vorotamoroz
2026-01-09 12:15:57 +00:00
parent 934f708753
commit a502b0cd0c
2 changed files with 10 additions and 5 deletions

View File

@@ -9,6 +9,11 @@ on:
type: boolean
default: true
required: false
testDir:
description: 'Run a specific test directory (path relative to test root)'
type: string
default: 'suite/'
required: false
permissions:
contents: read
@@ -42,13 +47,13 @@ jobs:
if: ${{ inputs.coverage == false }}
env:
CI: true
run: npm run test
run: npm run test ${ inputs.testDir }
- name: Run tests with coverage
if: ${{ inputs.coverage == true }}
env:
CI: true
run: npm run test:coverage
run: npm run test:coverage ${ inputs.testDir }
- name: Upload coverage artifact
if: ${{ inputs.coverage && always() }}

View File

@@ -9,9 +9,9 @@ import {
type ObsidianLiveSyncSettings,
} from "@/lib/src/common/types";
import { settingBase } from "./variables.ts";
import { defaultFileOption } from "./db_common";
import { syncBasicCase } from "./sync.senario.basic.ts";
import { settingBase } from "../suite/variables.ts";
import { defaultFileOption } from "../suite/db_common";
import { syncBasicCase } from "../suite/sync.senario.basic.ts";
export const env = (import.meta as any).env;
function* generateCase() {