Skip to content

Commit

Permalink
Merge pull request #6 from v-idol/fix/test-workflow
Browse files Browse the repository at this point in the history
fix: test workflow
  • Loading branch information
rdmclin2 authored Mar 24, 2024
2 parents 7b71d01 + 713fae7 commit 671f4da
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions scripts/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@ import { consola } from "consola";
import { readJSONSync } from "fs-extra";
import { resolve } from "node:path";

import { formatAndCheckSchema } from "./check";
import { agents, agentsDir, root } from "./const";
import { formatAgentSchema, formatDanceSchema } from "./check";
import { agentFiles, agentsDir, root, danceFiles, dancesDir } from "./const";

const runTest = () => {
for (const file of agents) {
for (const file of agentFiles) {
if (file.isFile()) {
const filePath = resolve(agentsDir, file.name);
consola.start(filePath.replace(root, ""));
const agent = readJSONSync(filePath);
formatAndCheckSchema(agent);
formatAgentSchema(agent);
}
}

for (const file of danceFiles) {
if (file.isFile()) {
const filePath = resolve(dancesDir, file.name);
consola.start(filePath.replace(root, ""));
const agent = readJSONSync(filePath);
formatDanceSchema(agent);
}
}
};
Expand Down

0 comments on commit 671f4da

Please sign in to comment.