Compare commits
8 Commits
ae508ded6d
...
c94a7abfb2
| Author | SHA1 | Date | |
|---|---|---|---|
| c94a7abfb2 | |||
| f9427c577c | |||
| 48b0f7b8a3 | |||
| 83792848ed | |||
| 09c74b28ab | |||
| d233ec757c | |||
| dedafaa4de | |||
| e213dba0e5 |
42
.gitea/workflows/ci.yml
Normal file
42
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,42 @@
|
||||
name: Integration Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
integration-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node (required by Prisma)
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "24.13.0"
|
||||
|
||||
- name: Setup runtime environment (Bun)
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Index route sync
|
||||
run: bun run route:sync
|
||||
|
||||
- name: Linting test
|
||||
run: bun run lint
|
||||
|
||||
- name: Create dummy system account
|
||||
run: bun run dummy:systemaccount
|
||||
|
||||
- name: Generate prisma schema
|
||||
run: bunx prisma generate
|
||||
|
||||
- name: Build test
|
||||
run: bun run build
|
||||
35
.github/workflows/ci.yaml
vendored
35
.github/workflows/ci.yaml
vendored
@ -0,0 +1,35 @@
|
||||
name: Intergration Tests
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
integration-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup runtime environment (Bun)
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install depedencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Index route sync
|
||||
run: bun run route:sync
|
||||
|
||||
- name: Linting test
|
||||
run: bun run lint
|
||||
|
||||
- name: Create dummy system account
|
||||
run: bun run dummy:systemaccount
|
||||
|
||||
- name: Generate prisma schema
|
||||
run: bunx prisma generate
|
||||
|
||||
- name: Build test
|
||||
run: bun run build
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
"prisma:dbml": "bunx prisma db pull && bunx prisma dbml --output ./prisma/dbml/schema.dbml",
|
||||
"prisma:reset": "bunx prisma db push --force-reset",
|
||||
"prisma:seed": "bun run ./prisma/seed/index.ts",
|
||||
"dummy:systemaccount": "bun run ./scripts/create-dummy-system-account.ts",
|
||||
"route:sync": "bun run ./scripts/sync-routes.ts",
|
||||
"env:publish": "bun run ./scripts/create-example-env.ts"
|
||||
},
|
||||
|
||||
16
scripts/create-dummy-system-account.ts
Normal file
16
scripts/create-dummy-system-account.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { generateUUIDv7 } from "../src/helpers/databases/uuidv7";
|
||||
import { createFile } from "../src/helpers/files/createFile";
|
||||
|
||||
const createDummySystemAccount = async () => {
|
||||
const file = await createFile(
|
||||
`export const SystemAccountId = "${generateUUIDv7()}";`,
|
||||
{
|
||||
fileName: "system.ts",
|
||||
targetDir: "src/config/account",
|
||||
overwriteIfExists: true,
|
||||
},
|
||||
);
|
||||
console.log(`Dummy system account created with id in file: ${file}`);
|
||||
};
|
||||
|
||||
createDummySystemAccount();
|
||||
@ -25,4 +25,6 @@ export const createFile = async (content: string, config: CreateFileConfig) => {
|
||||
|
||||
// Write content to the file
|
||||
await fs.promises.writeFile(targetFile, content, "utf8");
|
||||
|
||||
return targetFile;
|
||||
};
|
||||
|
||||
6
src/modules/media/index.ts
Normal file
6
src/modules/media/index.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import Elysia from "elysia";
|
||||
|
||||
export const mediaModule = new Elysia({ prefix: "/media" }).get(
|
||||
"/",
|
||||
() => "Media Module",
|
||||
);
|
||||
Reference in New Issue
Block a user