Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,22 @@ jobs:
- run: bun audit --audit-level=moderate --ignore GHSA-vfj7-8cjw-p6xm

pr-check:
name: pr-check (${{ matrix.job }})
runs-on: ${{ (github.event.pull_request.user.login == github.repository_owner && github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted", "dokploy-ci"]') || 'ubuntu-latest' }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
job: [build, test, typecheck]
include:
- job: build
command: bun run build
- job: test
command: bun run test -- --exclude "**/*.real.test.ts"
# Docker-backed tests take ~3 minutes, so they get their own runner.
- job: test-real
command: bun run test -- real.test.ts
- job: typecheck
command: bun run typecheck
steps:
- uses: actions/checkout@v7
with:
Expand All @@ -46,25 +56,25 @@ jobs:
node-version: 24.4.0

- name: Install Nixpacks
if: matrix.job == 'test' && runner.environment == 'github-hosted'
if: matrix.job == 'test-real' && runner.environment == 'github-hosted'
run: |
export NIXPACKS_VERSION=1.41.0
curl -sSL https://nixpacks.com/install.sh | bash
echo "Nixpacks installed $NIXPACKS_VERSION"

- name: Install Railpack
if: matrix.job == 'test' && runner.environment == 'github-hosted'
if: matrix.job == 'test-real' && runner.environment == 'github-hosted'
run: |
export RAILPACK_VERSION=0.15.4
curl -sSL https://railpack.com/install.sh | bash
echo "Railpack installed $RAILPACK_VERSION"

- name: Add build tools to PATH
if: matrix.job == 'test'
if: matrix.job == 'test-real'
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Initialize Docker Swarm
if: matrix.job == 'test'
if: matrix.job == 'test-real'
run: |
# The Mac mini keeps its swarm between runs.
if [ "$(docker info --format '{{.Swarm.LocalNodeState}}')" != "active" ]; then
Expand All @@ -75,7 +85,7 @@ jobs:

- run: bun install --frozen-lockfile
- run: bun run server:build
- run: bun run ${{ matrix.job }}
- run: ${{ matrix.command }}
env:
# The fork's db module throws without a password in production, and the Next build imports it.
POSTGRES_PASSWORD: ${{ matrix.job == 'build' && 'build-time-postgres-password' || '' }}