mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-08-25 23:06:41 +02:00
update github action
This commit is contained in:
23
.github/workflows/node.js.yml
vendored
23
.github/workflows/node.js.yml
vendored
@@ -60,24 +60,11 @@ jobs:
|
||||
with:
|
||||
java-version: 21
|
||||
- run: npm install
|
||||
- run: npm install clickhouse
|
||||
- run: npm install redis
|
||||
- run: npm install mongodb
|
||||
- run: npm install pg-promise
|
||||
- run: npm install sqlite3
|
||||
- run: npm run build:compact --if-present
|
||||
- run: npm run build:module:compact --if-present
|
||||
- run: npm run build:light --if-present
|
||||
- run: npm run build:module:light --if-present
|
||||
- run: npm run build:compact
|
||||
- run: npm run build:module:compact
|
||||
- run: npm run build:light
|
||||
- run: npm run build:module:light
|
||||
- run: npm install
|
||||
working-directory: test
|
||||
- run: npm run test:github-1
|
||||
working-directory: test
|
||||
- run: npm run test:github-2
|
||||
working-directory: test
|
||||
- run: npm run test:github-3
|
||||
working-directory: test
|
||||
- run: npm run test:github-4
|
||||
working-directory: test
|
||||
- run: npm run test:github-5
|
||||
- run: npm run test:github
|
||||
working-directory: test
|
||||
|
@@ -4,11 +4,7 @@
|
||||
"scripts": {
|
||||
"test": "mocha ./*.js --exit",
|
||||
"test:ts": "npx tsc --noEmit --lib esnext ./types.ts",
|
||||
"test:github-1": "npm run test:ts ",
|
||||
"test:github-2": "mocha ./*.js --exit flexsearch.light.min",
|
||||
"test:github-3": "mocha ./*.js --exit flexsearch.light.module.min",
|
||||
"test:github-4": "mocha ./*.js --exit flexsearch.compact.min",
|
||||
"test:github-5": "mocha ./*.js --exit flexsearch.compact.module.min",
|
||||
"test:github": "npm run test:ts && mocha ./*.js --exit flexsearch.light.min && mocha ./*.js --exit flexsearch.light.module.min && mocha ./*.js --exit flexsearch.compact.min && mocha ./*.js --exit flexsearch.compact.module.min",
|
||||
"test:coverage": "c8 -c ./.c8rc.json mocha ./*.js --exit",
|
||||
"test:keystore": "set NODE_OPTIONS=--max-old-space-size=16000 && c8 -c ./.c8rc.json mocha ./keystore.js --exit",
|
||||
"test:db": "c8 -c ./.c8rc.json mocha ./persistent.*.js --exit",
|
||||
|
@@ -10,12 +10,10 @@ const build_compact = env && env.includes("compact");
|
||||
const build_esm = !env || env.startsWith("module");
|
||||
const Charset = _Charset || (await import("../src/charset.js")).default;
|
||||
|
||||
import Clickhouse_src from "../src/db/clickhouse/index.js";
|
||||
import Clickhouse_dist from "../dist/module/db/clickhouse/index.js";
|
||||
import tests from "./persistent.js";
|
||||
|
||||
if(!build_light && !build_compact){
|
||||
describe("Persistent: Clickhouse", function(){
|
||||
tests(env ? Clickhouse_dist : Clickhouse_src, "Clickhouse");
|
||||
describe("Persistent: Clickhouse", async function(){
|
||||
await tests("Clickhouse");
|
||||
});
|
||||
}
|
||||
|
@@ -10,7 +10,24 @@ const build_compact = env && env.includes("compact");
|
||||
const build_esm = !env || env.startsWith("module");
|
||||
const Charset = _Charset || (await import("../src/charset.js")).default;
|
||||
|
||||
export default function(DB, DBClass){
|
||||
export default async function(DBClass){
|
||||
|
||||
let DB;
|
||||
if(DBClass === "Clickhouse"){
|
||||
DB = (await import(env ? "../dist/module/db/clickhouse/index.js" : "../src/db/clickhouse/index.js")).default;
|
||||
}
|
||||
if(DBClass === "Redis"){
|
||||
DB = (await import(env ? "../dist/module/db/redis/index.js" : "../src/db/redis/index.js")).default;
|
||||
}
|
||||
if(DBClass === "Mongo"){
|
||||
DB = (await import(env ? "../dist/module/db/mongodb/index.js" : "../src/db/mongodb/index.js")).default;
|
||||
}
|
||||
if(DBClass === "SQLite"){
|
||||
DB = (await import(env ? "../dist/module/db/sqlite/index.js" : "../src/db/sqlite/index.js")).default;
|
||||
}
|
||||
if(DBClass === "Postgres"){
|
||||
DB = (await import(env ? "../dist/module/db/postgres/index.js" : "../src/db/postgres/index.js")).default;
|
||||
}
|
||||
|
||||
const data = [{
|
||||
"tconst": "tt0000001",
|
||||
|
@@ -10,12 +10,10 @@ const build_compact = env && env.includes("compact");
|
||||
const build_esm = !env || env.startsWith("module");
|
||||
const Charset = _Charset || (await import("../src/charset.js")).default;
|
||||
|
||||
import Mongo_src from "../src/db/mongodb/index.js";
|
||||
import Mongo_dist from "../dist/module/db/mongodb/index.js";
|
||||
import tests from "./persistent.js";
|
||||
|
||||
if(!build_light && !build_compact){
|
||||
describe("Persistent: Mongo", function(){
|
||||
tests(env ? Mongo_dist : Mongo_src, "Mongo");
|
||||
describe("Persistent: Mongo", async function(){
|
||||
await tests("Mongo");
|
||||
});
|
||||
}
|
||||
|
@@ -10,12 +10,10 @@ const build_compact = env && env.includes("compact");
|
||||
const build_esm = !env || env.startsWith("module");
|
||||
const Charset = _Charset || (await import("../src/charset.js")).default;
|
||||
|
||||
import Postgres_src from "../src/db/postgres/index.js";
|
||||
import Postgres_dist from "../dist/module/db/postgres/index.js";
|
||||
import tests from "./persistent.js";
|
||||
|
||||
if(!build_light && !build_compact){
|
||||
describe("Persistent: Postgres", function(){
|
||||
tests(env ? Postgres_dist : Postgres_src, "Postgres");
|
||||
describe("Persistent: Postgres", async function(){
|
||||
await tests("Postgres");
|
||||
});
|
||||
}
|
||||
|
@@ -10,12 +10,10 @@ const build_compact = env && env.includes("compact");
|
||||
const build_esm = !env || env.startsWith("module");
|
||||
const Charset = _Charset || (await import("../src/charset.js")).default;
|
||||
|
||||
import Redis_src from "../src/db/redis/index.js";
|
||||
import Redis_dist from "../dist/module/db/redis/index.js";
|
||||
import tests from "./persistent.js";
|
||||
|
||||
if(!build_light && !build_compact){
|
||||
describe("Persistent: Redis", function(){
|
||||
tests(env ? Redis_dist : Redis_src, "Redis");
|
||||
describe("Persistent: Redis", async function(){
|
||||
await tests("Redis");
|
||||
});
|
||||
}
|
||||
|
@@ -10,12 +10,10 @@ const build_compact = env && env.includes("compact");
|
||||
const build_esm = !env || env.startsWith("module");
|
||||
const Charset = _Charset || (await import("../src/charset.js")).default;
|
||||
|
||||
import SQLite_src from "../src/db/sqlite/index.js";
|
||||
import SQLite_dist from "../dist/module/db/sqlite/index.js";
|
||||
import tests from "./persistent.js";
|
||||
|
||||
if(!build_light && !build_compact){
|
||||
describe("Persistent: SQLite", function(){
|
||||
tests(env ? SQLite_dist : SQLite_src, "SQLite");
|
||||
describe("Persistent: SQLite", async function(){
|
||||
await tests("SQLite");
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user