Skip to content

[pull] next from trpc:next #5

[pull] next from trpc:next

[pull] next from trpc:next #5

Workflow file for this run

name: main
on:
pull_request:
types: [synchronize, opened, reopened]
push:
branches: [main, next, canary]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
# only run on PRs
if: github.event_name == 'pull_request'
timeout-minutes: 10
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- run: pnpm build
test:
timeout-minutes: 10
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- run: pnpm test-ci
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
# only use token if not a fork PR
token: ${{ github.event.pull_request.head.repo.fork == false && secrets.CODECOV_TOKEN || '' }}
e2e:
# only run on PRs
if: github.event_name == 'pull_request'
name: 'E2E-tests'
needs: [build]
services:
postgres:
image: postgres
env:
POSTGRES_DATABASE: trpcdb
POSTGRES_USER: postgres
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
env:
NEXTAUTH_SECRET: supersecret
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
runs-on: ubuntu-latest
timeout-minutes: 10
continue-on-error: true
strategy:
matrix:
dir: [
.experimental/next-app-dir,
.test/diagnostics-big-router,
.test/internal-types-export,
.test/ssg,
cloudflare-workers,
express-minimal,
express-server,
fastify-server,
minimal-react,
next-formdata,
next-minimal-starter,
next-prisma-starter,
next-prisma-todomvc,
next-prisma-websockets-starter,
# next-sse-chat,
soa,
standalone-server,
tanstack-start,
vercel-edge-runtime,
]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- run: pnpm build
- name: Install playwright ???
# Seems like some of playwright's system deps aren't being cached, so we're making sure they are installed
run: |
cat ./examples/${{ matrix.dir }}/package.json |
if grep --silent '"@playwright/test"';
then pnpm playwright install chromium;
fi
- run: cp ./examples/${{ matrix.dir }}/.env.example ./examples/${{ matrix.dir }}/.env || true
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} test-dev
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} build type-check
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} test-start
e2e-deno:
# only run on PRs
if: github.event_name == 'pull_request'
name: 'E2E-tests (Deno)'
needs: [build]
env:
NEXTAUTH_SECRET: supersecret
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_REMOTE_ONLY: true
runs-on: ubuntu-latest
timeout-minutes: 10
continue-on-error: true
strategy:
matrix:
dir: [deno-deploy]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- run: pnpm build
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- run: deno --version
- run: |
cd ./examples/${{ matrix.dir }}
pnpm dlx start-server-and-test "deno run --allow-net=:8000 --allow-env ./src/index.ts" http://127.0.0.1:8000 "deno run --allow-net --allow-env ./src/client.ts"
e2e-bun:
# only run on PRs
if: github.event_name == 'pull_request'
name: 'E2E-tests (Bun)'
needs: [build]
env:
NEXTAUTH_SECRET: supersecret
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
# TURBO_REMOTE_ONLY: true
runs-on: ${{ matrix.os }}
timeout-minutes: 10
continue-on-error: true
strategy:
matrix:
dir: [bun]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- run: pnpm build
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun --version
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} test-dev
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} build type-check
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} test-start
e2e-legacy-node:
# only run on PRs
if: github.event_name == 'pull_request'
needs: [build]
services:
postgres:
image: postgres
env:
POSTGRES_DATABASE: trpcdb
POSTGRES_USER: postgres
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
env:
NEXTAUTH_SECRET: supersecret
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
runs-on: ubuntu-latest
timeout-minutes: 10
continue-on-error: true
strategy:
matrix:
dir:
[
next-prisma-starter,
next-prisma-websockets-starter,
next-prisma-todomvc,
]
node-start: ['18.x', '20.x']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- run: pnpm build
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-start }}
cache: 'pnpm'
- run: node -v
- name: Install playwright ???
# Seems like some of playwright's system deps aren't being cached, so we're making sure they are installed
run: |
cat ./examples/${{ matrix.dir }}/package.json |
if grep --silent '"@playwright/test"';
then pnpm playwright install chromium;
fi
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} test-dev
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} build type-check
- run: pnpm turbo --filter ./examples/${{ matrix.dir }} test-start
# https://pkg.pr.new
release-tmp:
name: Release using pkg.pr.new
needs: [build]
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- run: pnpm build
- run: pnpx pkg-pr-new publish './packages/*'