diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 7a1da6a124c..3a38f964c34 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -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: @@ -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 @@ -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' || '' }}