mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-10 14:53:09 +00:00
Split the tests
This commit is contained in:
@@ -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() {
|
||||||
Reference in New Issue
Block a user