Skip to content

Commit 0549951

Browse files
authored
Merge pull request #119 from ThisIsMissEm/chore/add-test-config
2 parents df42c80 + 7a16faf commit 0549951

File tree

5 files changed

+80
-2
lines changed

5 files changed

+80
-2
lines changed

.env.test

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/hollo_test
2+
SECRET_KEY="test_determinist_key_DO_NOT_USE_IN_PRODUCTION"
3+
4+
# LOG_LEVEL=debug
5+
# LOG_QUERY=true
6+
7+
# Setting ALLOW_PRIVATE_ADDRESS to true disables SSRF (Server-Side Request Forgery) protection
8+
# Set to true to test in local network
9+
# Will be replaced by list of allowed IPs once https://github.com/dahlia/fedify/issues/157
10+
# is implemented.
11+
ALLOW_PRIVATE_ADDRESS=false
12+
13+
REMOTE_ACTOR_FETCH_POSTS=10
14+
15+
# We actually use fake storage in tests:
16+
DRIVE_DISK=fs
17+
FS_ASSET_PATH=tmp/test_storage
18+
ASSET_URL_BASE="http://hollo.test/"

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ jobs:
7878
- name: Run the database migrations
7979
run: pnpm run migrate
8080
- name: Run the tests
81-
run: pnpm test
81+
run: pnpm test:ci

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.env
2-
.env.test
32
assets/
43
fedify-hollo-*.tgz
54
*.jsonl

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"prod": "pnpm run migrate && tsx --env-file-if-exists=.env --dns-result-order=ipv6first bin/server.ts",
99
"dev": "pnpm run migrate && tsx watch --env-file-if-exists=.env --dns-result-order=ipv6first bin/server.ts",
1010
"test": "pnpm run migrate:test && tsx --env-file-if-exists=.env.test --test",
11+
"test:ci": "drizzle-kit migrate && tsx --test --test-reporter=@reporters/github --test-reporter-destination=stdout",
1112
"check": "tsc && biome check .",
1213
"check:ci": "tsc && biome ci --reporter=github .",
1314
"migrate": "drizzle-kit migrate",
@@ -60,6 +61,7 @@
6061
"devDependencies": {
6162
"@biomejs/biome": "^1.9.4",
6263
"@dotenvx/dotenvx": "^1.37.0",
64+
"@reporters/github": "^1.7.2",
6365
"@types/fluent-ffmpeg": "^2.1.27",
6466
"@types/markdown-it": "^14.1.2",
6567
"@types/node": "^22.13.4",

pnpm-lock.yaml

Lines changed: 59 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)