mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-09 11:51:15 +02:00
112 lines
3.7 KiB
YAML
112 lines
3.7 KiB
YAML
name: Check
|
|
|
|
# Validates the repository type graph and website docs.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "submodules/distilled"
|
|
- "benchmark/**"
|
|
- "examples/**"
|
|
- "packages/**"
|
|
- "website/**"
|
|
- "scripts/**"
|
|
- "patches/**"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
- "turbo.json"
|
|
- "tsconfig.json"
|
|
- ".github/workflows/check.yml"
|
|
pull_request:
|
|
types: [opened, reopened, synchronize]
|
|
paths:
|
|
- "submodules/distilled"
|
|
- "benchmark/**"
|
|
- "examples/**"
|
|
- "packages/**"
|
|
- "website/**"
|
|
- "scripts/**"
|
|
- "patches/**"
|
|
- "package.json"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
- "turbo.json"
|
|
- "tsconfig.json"
|
|
- ".github/workflows/check.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: check-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
runs-on: blacksmith-8vcpu-ubuntu-2404
|
|
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 Astro build cache
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: website/node_modules/.astro
|
|
key: website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-${{ github.sha }}-${{ github.workflow }}-${{ github.run_attempt }}
|
|
restore-keys: |
|
|
website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-${{ github.sha }}-
|
|
website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-
|
|
website-astro-check-${{ runner.os }}-main-
|
|
|
|
- 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: Run Node Utils tests
|
|
run: pnpm -C packages/node-utils test
|
|
|
|
- name: Run pkg tests
|
|
run: pnpm -C packages/pkg test
|
|
|
|
- name: Run Typecheck
|
|
run: pnpm tsc -b
|
|
|
|
# Must run after `tsc -b`: it reads distilled's emitted `lib/*.d.ts`,
|
|
# and stale/missing declarations resolve to `any`.
|
|
- name: Lint providers
|
|
run: pnpm lint:providers
|
|
|
|
- name: Test CLI launcher
|
|
run: timeout 240 pnpm test test/Cli/launcher.test.ts test/Cli/exitCodes.test.ts --retry 0 --concurrency 1
|
|
|
|
- name: Check API JSDocs
|
|
run: pnpm docs:check-jsdoc
|
|
|
|
# An internal PR carrying `deploy-website` gets a full Astro build in
|
|
# website.yml via StaticSite. That build runs the same output validators,
|
|
# so avoid building the site a second time here. Forks still run this
|
|
# check because they cannot access the preview deployment secrets.
|
|
- name: Check website docs
|
|
if: >-
|
|
github.event.pull_request.head.repo.full_name != github.repository ||
|
|
!contains(github.event.pull_request.labels.*.name, 'deploy-website')
|
|
run: pnpm docs:check
|