Skip to content

Replace OpenNext Cloudflare build with vinext #388

Replace OpenNext Cloudflare build with vinext

Replace OpenNext Cloudflare build with vinext #388

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths:
- "src/**"
- "tests/**"
- "package.json"
- "bun.lock"
- "tsconfig.json"
- "eslint.config.ts"
- "next.config.ts"
- "vite.config.ts"
- "wrangler.jsonc"
- "worker/**"
- "drizzle.config.ts"
- ".oxfmtrc.json"
- "lefthook.yml"
- "migrations/**"
- ".github/workflows/ci.yml"
- ".env.example"
pull_request:
branches: [main]
paths:
- "src/**"
- "tests/**"
- "package.json"
- "bun.lock"
- "tsconfig.json"
- "eslint.config.ts"
- "next.config.ts"
- "vite.config.ts"
- "wrangler.jsonc"
- "worker/**"
- "drizzle.config.ts"
- ".oxfmtrc.json"
- "lefthook.yml"
- "migrations/**"
- ".github/workflows/ci.yml"
- ".env.example"
jobs:
format:
name: Format
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Cache Bun dependencies
uses: actions/cache@v4
id: bun-cache
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Run oxfmt
run: bun run format
lint:
name: Lint
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Cache Bun dependencies
uses: actions/cache@v4
id: bun-cache
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Cache ESLint results
uses: actions/cache@v4
with:
path: .cache/eslint
key: ${{ runner.os }}-eslint-${{ hashFiles('bun.lock', 'package.json', 'eslint.config.ts', 'tsconfig.json') }}
restore-keys: |
${{ runner.os }}-eslint-
- name: Run ESLint
run: bun run lint
typecheck:
name: Type Check
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Cache Bun dependencies
uses: actions/cache@v4
id: bun-cache
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Cache TypeScript incremental state
uses: actions/cache@v4
with:
path: .cache/tsgo
key: ${{ runner.os }}-tsgo-${{ hashFiles('bun.lock', 'package.json', 'tsconfig.json') }}
restore-keys: |
${{ runner.os }}-tsgo-
- name: Run type check
run: bun run typecheck
test:
name: Test
runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.10
- name: Cache Bun dependencies
uses: actions/cache@v4
id: bun-cache
with:
path: |
~/.bun/install/cache
node_modules
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Install dependencies
if: steps.bun-cache.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
- name: Run tests
run: NODE_ENV=test bun test --env-file=.env.example --preload=./tests/preload.ts --bail