Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: wip add script to install, build, and typecheck examples #104

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: add some logging
Signed-off-by: Logan McAnsh <[email protected]>
  • Loading branch information
mcansh committed Jan 28, 2023
commit 5413cab01caba1e8e190d3b3930853f0db584762
8 changes: 8 additions & 0 deletions __scripts/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ const settled = await Promise.allSettled(

const install = await getCommand(detected, "install", ["--silent"]);
const installArgs = install.split(" ").slice(1, -1);
console.log(
`Installing ${example} with ${detected} ${installArgs.join(" ")}`
);
const installResult = await execa(detected, installArgs, options);

if (installResult.exitCode) {
Expand All @@ -54,6 +57,7 @@ const settled = await Promise.allSettled(
);

if (hasPrisma) {
console.log("Generating prisma types for", example);
const prismaGenerate = await execa(
"npx",
["prisma", "generate"],
Expand All @@ -69,6 +73,7 @@ const settled = await Promise.allSettled(

const build = await getCommand(detected, "run", ["build"]);
const buildArgs = build.split(" ").slice(1);
console.log(`Building ${example} with ${detected} ${buildArgs.join(" ")}`);
const buildResult = await execa(detected, buildArgs, options);

if (buildResult.exitCode) {
Expand All @@ -90,6 +95,9 @@ const settled = await Promise.allSettled(

const typecheck = await getCommand(detected, "run", ["typecheck"]);
const typecheckArgs = typecheck.split(" ").slice(1);
console.log(
`Typechecking ${example} with ${detected} ${typecheckArgs.join(" ")}`
);
const typecheckResult = await execa(detected, typecheckArgs, options);

if (typecheckResult.exitCode) {
Expand Down