mirror of
https://github.com/zkldi/Tachi.git
synced 2026-09-30 02:48:01 +03:00
* checkpoint * server compiles again * fmt * checkpoint * last one out, get the lights * euston station * like, mostly good. I'm under the ocean right now. * fix: some nonsense AI stuff * fix: new eslint rules, and cleanup imports across the board * feat: folder slug rewrite, email logic change, too * fix: register must use txn not db * checkpoint
102 lines
2.5 KiB
Plaintext
102 lines
2.5 KiB
Plaintext
check:
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
source .scripts/multi_evaluator.sh
|
|
|
|
evaluate "just fmt-check"
|
|
evaluate "bun run --filter '*' lint"
|
|
evaluate "just typecheck"
|
|
|
|
post_evaluate
|
|
|
|
typecheck:
|
|
bun run --elide-lines=0 --filter '!tachi-seeds-scripts' typecheck
|
|
|
|
typecheck-sequential:
|
|
bun run --elide-lines=0 --filter '!tachi-seeds-scripts' typecheck
|
|
|
|
fix:
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
just gen
|
|
bun run --elide-lines=0 --filter '*' lint-fix
|
|
.scripts/ts_autoinherit.js
|
|
just fmt
|
|
|
|
# Automatically fix any issues we can in the codebase and then
|
|
# make a commit for them
|
|
autofix:
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Only generate a commit if the repo is clean
|
|
SHOULD_COMMIT=0
|
|
if [ -z "$(git status --porcelain)" ]; then
|
|
SHOULD_COMMIT=1
|
|
fi
|
|
|
|
just fix
|
|
|
|
if [ $SHOULD_COMMIT -eq 1 ]; then
|
|
git add .
|
|
git commit -m "chore: autofix"
|
|
fi
|
|
|
|
fmt:
|
|
bun biome format --write
|
|
bun prettier --write --list-different .
|
|
# cd deploy/infra && tofu fmt -diff
|
|
|
|
fmt-check:
|
|
bun biome format
|
|
bun prettier --check .
|
|
# cd deploy/infra && tofu fmt --check -diff
|
|
|
|
test FILTER="*":
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
source .scripts/multi_evaluator.sh
|
|
|
|
evaluate "just test-typescript '{{FILTER}}'"
|
|
|
|
post_evaluate
|
|
|
|
test-typescript FILTER="*":
|
|
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
bun run --elide-lines=0 --sequential --filter '{{FILTER}}' test -- --reporter=default --reporter=junit --outputFile.junit=test-results/junit.xml
|
|
|
|
# Summarize Vitest v8 coverage across workspaces (see typescript/coverage-tools).
|
|
coverage-report *ARGS:
|
|
bun run --filter tachi-coverage-tools report -- {{ARGS}}
|
|
|
|
|
|
# Run all parity suites, or a single one if a name is given.
|
|
test-parity suite="":
|
|
TACHI_SERVER=https://localhost:8080 bun vitest run {{ if suite != "" { "tests/" + suite + ".test.ts" } else { "" } }}
|
|
|
|
# ==> Orchestration of parallel db tests
|
|
|
|
# Create (or recreate) the bot test template database with all migrations applied.
|
|
# Workers clone from this template rather than re-running migrations each time.
|
|
bot-db-test-template-reset:
|
|
#!/bin/bash
|
|
export POSTGRES_URL="{{POSTGRES_URL}}/tachi_bot_test_template"
|
|
tachidb database drop || true
|
|
tachidb database create
|
|
tachidb migrate run
|
|
|
|
# Create (or recreate) the server test template database with all migrations applied.
|
|
# Workers clone from this template rather than re-running migrations each time.
|
|
server-db-test-template-reset:
|
|
#!/bin/bash
|
|
export POSTGRES_URL="{{POSTGRES_URL}}/tachi_server_test_template"
|
|
tachidb database drop || true
|
|
tachidb database create
|
|
tachidb migrate run
|
|
|
|
# <== End of parallel db test justscripts |