The best way to control Claude Code, Codex and more from any computer or phone

main
yml 97 lines 3.33 KB
Raw
1 name: Check
2
3 # Validates repository formatting, the type graph, and website docs.
4
5 on:
6 push:
7 branches: [main]
8 pull_request:
9 types: [opened, reopened, synchronize]
10 workflow_dispatch:
11
12 permissions:
13 contents: read
14
15 concurrency:
16 group: check-${{ github.ref }}
17 cancel-in-progress: ${{ github.event_name == 'pull_request' }}
18
19 jobs:
20 check:
21 name: Check
22 runs-on: blacksmith-8vcpu-ubuntu-2404
23 steps:
24 - name: Checkout repository
25 uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26
27 - name: Checkout distilled
28 run: git submodule update --init --depth=1 --checkout -- submodules/distilled
29
30 - name: Restore Astro build cache
31 uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
32 with:
33 path: website/node_modules/.astro
34 key: website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-${{ github.sha }}-${{ github.workflow }}-${{ github.run_attempt }}
35 restore-keys: |
36 website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-${{ github.sha }}-
37 website-astro-check-${{ runner.os }}-${{ github.event.pull_request.number || 'main' }}-
38 website-astro-check-${{ runner.os }}-main-
39
40 - name: Setup pnpm, Node.js, Bun and install dependencies
41 uses: pnpm/setup@703c52620218391530e48b9e8870d5c0082e1b9b # v2.1.0
42 with:
43 cache: true
44 install: true
45 require-lockfile: true
46
47 - name: Check formatting
48 run: pnpm format:check
49
50 - name: Check package versions
51 run: pnpm validate:publish-packages
52
53 - name: Typecheck
54 run: pnpm typecheck
55
56 # Must run after the type check: it reads distilled's emitted `lib/*.d.ts`,
57 # and stale/missing declarations resolve to `any`.
58 - name: Lint providers
59 run: pnpm lint:providers
60
61 # Type-aware, so it also needs the build above.
62 - name: Run Lint
63 run: pnpm lint
64
65 - name: Run Node Utils tests
66 run: pnpm -C packages/node-utils test
67
68 - name: Run pkg tests
69 run: pnpm -C packages/pkg test
70
71 - name: Run core engine tests
72 run: timeout 300 pnpm test test/plan.test.ts test/apply.test.ts --retry 0 --concurrency unbounded
73
74 # In memory: no cloud credentials.
75 - name: Run Domain tests
76 run: timeout 240 pnpm test:integration test/Domain --retry 0
77
78 - name: Test CLI launcher
79 run: |
80 timeout 240 pnpm test test/Cli/launcher.test.ts test/Cli/exitCodes.test.ts --retry 0 --concurrency 1
81 timeout 120 pnpm test:integration test/Cli/ProviderCheckEnv.test.ts --retry 0 --concurrency 1
82
83 - name: Check API JSDocs
84 run: pnpm docs:check-jsdoc
85
86 - name: Check package exports
87 run: pnpm exports:check
88
89 # An internal PR carrying `deploy-website` gets a full Astro build in
90 # website.yml via StaticSite. That build runs the same output validators,
91 # so avoid building the site a second time here. Forks still run this
92 # check because they cannot access the preview deployment secrets.
93 - name: Check website docs
94 if: >-
95 github.event.pull_request.head.repo.full_name != github.repository ||
96 !contains(github.event.pull_request.labels.*.name, 'deploy-website')
97 run: pnpm docs:check