fix(prd-1): inline GITHUB_SERVER_URL export in CI test step
Forgejo runner re-injects GITHUB_SERVER_URL after step-level env is set, so the env: key approach doesn't override it. Using inline export in the run command ensures the override takes effect before bun loads modules (config.ts module-level constants read process.env at import). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
638645b8af
commit
c9a6c56790
1 file changed
+9
-7
@@ -35,13 +35,15 @@ jobs:
|
||||
run: bun install
|
||||
|
||||
- name: Run tests
|
||||
run: bun test
|
||||
env:
|
||||
# Unit tests assume GitHub context. Override Forgejo runner's
|
||||
# GITHUB_SERVER_URL so module-level constants (config.ts) and
|
||||
# detectPlatform() default to GitHub. Forgejo-specific tests
|
||||
# explicitly set PLATFORM=forgejo in their own beforeEach.
|
||||
GITHUB_SERVER_URL: https://github.com
|
||||
# Unit tests assume GitHub context. Override Forgejo runner's
|
||||
# GITHUB_SERVER_URL so module-level constants (config.ts) and
|
||||
# detectPlatform() default to GitHub. Forgejo-specific tests
|
||||
# explicitly set PLATFORM=forgejo in their own beforeEach.
|
||||
# Inline export because Forgejo runner re-injects GITHUB_SERVER_URL
|
||||
# after step-level env:, overriding it.
|
||||
run: |
|
||||
export GITHUB_SERVER_URL=https://github.com
|
||||
bun test
|
||||
|
||||
prettier:
|
||||
runs-on: grunt
|
||||
|
||||
Reference in new issue
Block a user