mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-09 11:51:15 +02:00
98 lines
3.4 KiB
YAML
98 lines
3.4 KiB
YAML
name: Cloudflare Tools
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "submodules/distilled"
|
|
- "packages/cloudflare-runtime/**"
|
|
- "packages/cloudflare-test-tools/**"
|
|
- "packages/frontend-frameworks/**"
|
|
- "packages/node-utils/**"
|
|
- "scripts/copy-package-files.ts"
|
|
- "patches/**"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
- "turbo.json"
|
|
- "tsconfig.json"
|
|
- ".github/workflows/cloudflare-tools.yml"
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
paths:
|
|
- "submodules/distilled"
|
|
- "packages/cloudflare-runtime/**"
|
|
- "packages/cloudflare-test-tools/**"
|
|
- "packages/frontend-frameworks/**"
|
|
- "packages/node-utils/**"
|
|
- "scripts/copy-package-files.ts"
|
|
- "patches/**"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
- "turbo.json"
|
|
- "tsconfig.json"
|
|
- ".github/workflows/cloudflare-tools.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: cloudflare-tools-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
test:
|
|
# GitHub does not expose repository secrets to fork pull requests. Keep
|
|
# the secret-backed test matrix on trusted refs while still running it for
|
|
# pushes, manual dispatches, and pull requests from this repository.
|
|
if: >-
|
|
github.event_name != 'pull_request' ||
|
|
github.event.pull_request.head.repo.full_name == github.repository
|
|
name: Test (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- blacksmith-8vcpu-ubuntu-2404
|
|
- blacksmith-6vcpu-macos-latest
|
|
- blacksmith-8vcpu-windows-2025
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
|
|
- name: Checkout distilled
|
|
run: git submodule update --init --depth=1 --checkout -- submodules/distilled
|
|
|
|
- name: Restore Turbo cache
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: .turbo
|
|
key: turbo-${{ runner.os }}-${{ github.repository_id }}-${{ github.sha }}-${{ github.workflow }}-${{ github.run_attempt }}
|
|
restore-keys: |
|
|
turbo-${{ runner.os }}-${{ github.repository_id }}-${{ github.sha }}-
|
|
turbo-${{ runner.os }}-${{ github.repository_id }}-
|
|
|
|
- name: Setup pnpm, Node.js, Bun and install dependencies
|
|
uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
|
|
with:
|
|
cache: true
|
|
install: true
|
|
require-lockfile: true
|
|
|
|
- name: Typecheck
|
|
run: pnpm typecheck:cloudflare-packages
|
|
|
|
- name: Test
|
|
run: pnpm test:cloudflare-packages ${{ runner.os == 'Windows' && '--concurrency=3' || runner.os == 'macOS' && '--concurrency=2' || '' }}
|
|
env:
|
|
TEST_MYSQL_URL: ${{ secrets.TEST_MYSQL_URL }}
|
|
TEST_POSTGRES_URL: ${{ secrets.TEST_POSTGRES_URL }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
TEST_KV_NAMESPACE_ID: ${{ secrets.TEST_KV_NAMESPACE_ID }}
|
|
TEST_R2_BUCKET_NAME: ${{ secrets.TEST_R2_BUCKET_NAME }}
|
|
TEST_D1_DATABASE_ID: ${{ secrets.TEST_D1_DATABASE_ID }}
|
|
TEST_SERVICE_WORKER_NAME: ${{ secrets.TEST_SERVICE_WORKER_NAME }}
|