ci: reorganize project scripts and E2E workflows by type

This commit is contained in:
neon
2026-04-12 17:12:36 -06:00
parent 67ec10f703
commit 19f81faf4d
14 changed files with 21 additions and 17 deletions
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT_DIR"
if [[ ! -f server/.env ]]; then
@@ -1,3 +1,3 @@
import { listE2ESuites } from "./e2e-suites.mjs";
import { listE2ESuites } from "./suite-registry.mjs";
process.stdout.write(JSON.stringify(listE2ESuites().map(({ id, name, timeout }) => ({ id, name, timeout }))));
@@ -6,7 +6,7 @@ import { dirname, join } from "node:path";
import process from "node:process";
import { fileURLToPath } from "node:url";
import { getE2ESuite, listE2ESuites } from "./e2e-suites.mjs";
import { getE2ESuite, listE2ESuites } from "./suite-registry.mjs";
const DEFAULT_E2E_DATABASE_URL = "postgres://projectx:projectx@localhost:5432/projectx_e2e";
@@ -4,4 +4,4 @@ set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$ROOT_DIR"
node ./scripts/test/run-e2e-suite.mjs "$@"
node ./scripts/e2e/run-suite.mjs "$@"
@@ -2,7 +2,7 @@ import { execFileSync } from "node:child_process";
import { matchesGlob } from "node:path";
import process from "node:process";
import { E2E_GLOBAL_CHANGE_PATHS, listE2ESuites } from "./e2e-suites.mjs";
import { E2E_GLOBAL_CHANGE_PATHS, listE2ESuites } from "./suite-registry.mjs";
const ZERO_SHA_PATTERN = /^0+$/;
@@ -9,7 +9,11 @@ export const E2E_GLOBAL_CHANGE_PATHS = Object.freeze([
"docker/**",
]);
const SHARED_DB_AND_HELPER_PATHS = Object.freeze(["server/src/db/schema/**", "scripts/test/**", "scripts/db/**"]);
const SHARED_DB_AND_HELPER_PATHS = Object.freeze([
"server/src/db/schema/**",
"scripts/e2e/**",
"scripts/db/**",
]);
const SHARED_AUTH_TYPE_PATHS = Object.freeze(["packages/types/src/auth.ts", "packages/types/src/permissions.ts"]);
@@ -6,7 +6,7 @@
# Safe to run multiple times - sessions are deduplicated by session_id and
# daily stats are upserted. Running again adds more data on top.
#
# Usage: ./scripts/seed/reading-sessions.sh [USER_ID]
# Usage: ./scripts/fixtures/seed-reading-sessions.sh [USER_ID]
# USER_ID defaults to 1.
set -euo pipefail