mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-11 08:48:15 +03:00
* feat: i'm really worried about this bit, but empiricism will win * feat: light driving * feat: migrate over user game status * feat: custom scrollbar, and migrate over settings * feat: eamusement csv movement * fix: rm debug * feat: shark reaction * checkpoint * feat: get tests passing again * checkpoint * feat: bms table sync * feat: ugs snapshot and backsync bms pms * feat: checkpoint * feat: iidx playlists * manic depression * continues * fly * happy house * we're happy here * I think. 6 years is enough for me. This is killing me, and I am dying.
98 lines
2.4 KiB
Plaintext
98 lines
2.4 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 -- --coverage.reporter=lcov --reporter=default --reporter=junit --outputFile.junit=test-results/junit.xml
|
|
|
|
|
|
# Run all parity suites, or a single one if a name is given.
|
|
test-parity suite="":
|
|
TACHI_SERVER=https://127.0.0.1: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 |