mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-13 05:47:44 +02:00
170 lines
5 KiB
YAML
170 lines
5 KiB
YAML
name: Check
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches: [main, v4/next-minor, v4/next-major]
|
|
push:
|
|
branches: [main, v4/next-minor, v4/next-major]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
static-checks:
|
|
name: Static
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/setup
|
|
- name: Lint
|
|
run: pnpm lint
|
|
- name: Check circular dependencies
|
|
run: pnpm circular
|
|
- name: Generate AI documentation
|
|
run: pnpm ai-docgen
|
|
- name: Verify AI documentation is up-to-date
|
|
run: |
|
|
if [ -n "$(git status --short)" ]; then
|
|
git status --short
|
|
echo "Run 'pnpm ai-docgen' and commit generated changes."
|
|
exit 1
|
|
fi
|
|
|
|
types:
|
|
name: Types
|
|
runs-on: namespace-profile-linux-small
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
deno-version: v2.9.4
|
|
- run: pnpm check
|
|
env:
|
|
# Leave memory headroom for the runner by collecting the Go heap earlier.
|
|
GOMEMLIMIT: 4GiB
|
|
- run: deno check .
|
|
- run: pnpm test-types --target '>=5.9'
|
|
|
|
build:
|
|
name: Build
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/setup
|
|
- name: Set strip internals config
|
|
run: |
|
|
sed -i 's/"stripInternal": false/"stripInternal": true/' tsconfig.base.json
|
|
- run: pnpm build
|
|
- run: pnpm check-dist-types
|
|
|
|
bundle:
|
|
name: Bundle
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/setup
|
|
- name: Clone base ref
|
|
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
with:
|
|
path: base
|
|
ref: ${{ github.event.pull_request.base.ref }}
|
|
- name: Set strip internals config
|
|
run: |
|
|
sed -i 's/"stripInternal": false/"stripInternal": true/' tsconfig.base.json
|
|
sed -i 's/"stripInternal": false/"stripInternal": true/' base/tsconfig.base.json
|
|
- name: Build
|
|
run: |
|
|
pnpm build
|
|
cd base
|
|
pnpm install
|
|
pnpm build
|
|
- name: Compare bundle size
|
|
run: node ./packages/tools/bundle/src/bin.ts compare --base-dir base/packages/tools/bundle/fixtures
|
|
- name: Upload stats artifact
|
|
if: github.event_name == 'pull_request'
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
with:
|
|
name: bundle-stats
|
|
path: stats.txt
|
|
if-no-files-found: error
|
|
|
|
test:
|
|
name: Test (${{ matrix.runtime }})
|
|
runs-on: namespace-profile-linux-default
|
|
env:
|
|
EFFECT_INTEGRATION_TESTS: "1"
|
|
# The ephemeral runner provides cleanup without a Ryuk sidecar.
|
|
TESTCONTAINERS_RYUK_DISABLED: "true"
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 15
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runtime: Node
|
|
deno: ""
|
|
bun: ""
|
|
command: pnpm test --max-concurrency=10
|
|
- runtime: Deno
|
|
deno: v2.9.4
|
|
bun: ""
|
|
command: deno task test --max-concurrency=10
|
|
- runtime: Bun
|
|
deno: ""
|
|
bun: 1.4.0
|
|
command: bun run --bun vitest run --max-concurrency=10
|
|
steps:
|
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
|
|
- name: Pre-pull test container images
|
|
run: |
|
|
docker pull ghcr.io/tursodatabase/libsql-server:main &
|
|
docker pull postgres:alpine &
|
|
docker pull mysql:lts &
|
|
docker pull mcr.microsoft.com/mssql/server:2022-latest &
|
|
docker pull vitess/vttestserver:mysql80 &
|
|
docker pull redis:alpine &
|
|
wait
|
|
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
deno-version: ${{ matrix.deno }}
|
|
bun-version: ${{ matrix.bun }}
|
|
- name: Test
|
|
run: ${{ matrix.command }}
|
|
|
|
doctest:
|
|
name: Test (Documentation)
|
|
runs-on: namespace-profile-linux-small
|
|
permissions:
|
|
contents: read
|
|
timeout-minutes: 10
|
|
steps:
|
|
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
|
|
- name: Install dependencies
|
|
uses: ./.github/actions/setup
|
|
- name: Test Documentation
|
|
run: pnpm doctest
|