Files
claude-code-action/.forgejo/workflows/ci.yml
T
Vlad MocanuandClaude Opus 4.6 c9a6c56790 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>
2026-02-25 18:43:40 +02:00

93 lines
2.4 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: grunt
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Install Bun
run: |
if command -v bun &> /dev/null; then
echo "Bun already installed: $(bun --version)"
else
curl -fsSL https://bun.sh/install | bash
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run tests
# 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
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Install Bun
run: |
if command -v bun &> /dev/null; then
echo "Bun already installed: $(bun --version)"
else
curl -fsSL https://bun.sh/install | bash
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run prettier check
run: bun run format:check
typecheck:
runs-on: grunt
steps:
- name: Checkout
uses: https://${{ secrets.READ_REPO_TOKEN }}@git.wxs.ro/xternal/checkout@v6.0.2
with:
fetch-depth: 1
- name: Install Bun
run: |
if command -v bun &> /dev/null; then
echo "Bun already installed: $(bun --version)"
else
curl -fsSL https://bun.sh/install | bash
echo "$HOME/.bun/bin" >> "$GITHUB_PATH"
fi
- name: Install dependencies
run: bun install
- name: Run TypeScript type check
run: bun run typecheck