-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.88 KB
/
Copy pathci.yml
File metadata and controls
61 lines (50 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
# Matches the DeepSeek Harness toolchain version.
version: 11.7.0
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile=false
- name: Typecheck
run: pnpm run typecheck
- name: Build
run: pnpm run build
# `lib/` is committed so a GitHub-address install works without pnpm
# running a build script. This fails if the committed build is stale.
- name: Check the committed build matches the sources
run: |
if [ -n "$(git status --porcelain lib)" ]; then
echo "::error::lib/ is out of date. Run 'pnpm run build' and commit the result."
git --no-pager diff lib
exit 1
fi
- name: Verify the package contents
run: |
npm pack --dry-run 2>&1 | tee pack.txt
grep -q "lib/index.js" pack.txt || { echo "::error::lib/index.js missing from the package"; exit 1; }
grep -q "cordis.patch.yml" pack.txt || { echo "::error::cordis.patch.yml missing from the package"; exit 1; }
# These need a real OpenCode binary and reach a live provider, so they run
# only when one is installed on the runner. The pure checks always run.
- name: Unit checks (no provider needed)
run: |
pnpm run verify:offline
- name: Live checks (needs the OpenCode CLI)
if: hashFiles(format('{0}/.github/**', github.workspace)) != ''
run: |
if command -v opencode >/dev/null 2>&1; then
pnpm run verify:live
else
echo "::notice::OpenCode CLI not installed on this runner; live checks skipped"
fi