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
+7 -2
View File
@@ -9,6 +9,11 @@ on:
type: boolean type: boolean
default: true default: true
required: false required: false
testDir:
description: 'Run a specific test directory (path relative to test root)'
type: string
default: 'suite/'
required: false
permissions: permissions:
contents: read contents: read
@@ -42,13 +47,13 @@ jobs:
if: ${{ inputs.coverage == false }} if: ${{ inputs.coverage == false }}
env: env:
CI: true CI: true
run: npm run test run: npm run test ${ inputs.testDir }
- name: Run tests with coverage - name: Run tests with coverage
if: ${{ inputs.coverage == true }} if: ${{ inputs.coverage == true }}
env: env:
CI: true CI: true
run: npm run test:coverage run: npm run test:coverage ${ inputs.testDir }
- name: Upload coverage artifact - name: Upload coverage artifact
if: ${{ inputs.coverage && always() }} if: ${{ inputs.coverage && always() }}
@@ -9,9 +9,9 @@ import {
type ObsidianLiveSyncSettings, type ObsidianLiveSyncSettings,
} from "@/lib/src/common/types"; } from "@/lib/src/common/types";
import { settingBase } from "./variables.ts"; import { settingBase } from "../suite/variables.ts";
import { defaultFileOption } from "./db_common"; import { defaultFileOption } from "../suite/db_common";
import { syncBasicCase } from "./sync.senario.basic.ts"; import { syncBasicCase } from "../suite/sync.senario.basic.ts";
export const env = (import.meta as any).env; export const env = (import.meta as any).env;
function* generateCase() { function* generateCase() {