Repository navigation
73 lines (61 loc) · 2.38 KB
/
Copy pathci.yml
File metadata and controls
73 lines (61 loc) · 2.38 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
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
build:
name: Build / Type-check (Node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['22', '24']
steps:
- uses: actions/checkout@v6
# @agent-root/core is currently pinned to a local file:./vendor/
# tarball because the version on npm (0.2.0) is stale and missing
# APIs the CLI uses. The vendor tarball is gitignored, so it isn't
# present on the runner and `pnpm install` would fail. Skip the
# whole install/build/test job until @agent-root/core publishes a
# release with the manifest/install-state/records APIs and the
# dependency in package.json moves back to a semver range.
# See CLAUDE.md "Notes for AI assistants" #5 for the swap procedure.
- name: Check for vendored @agent-root/core tarball
id: vendor
run: |
if [ -f vendor/agent-root-core-0.2.0.tgz ]; then
echo "present=true" >> $GITHUB_OUTPUT
else
echo "::warning::vendor/agent-root-core-0.2.0.tgz not present; CI install/build/test steps will be skipped until @agent-root/core publishes a release with the required APIs and package.json moves back to a semver range."
echo "present=false" >> $GITHUB_OUTPUT
fi
- uses: pnpm/action-setup@v6
if: steps.vendor.outputs.present == 'true'
- uses: actions/setup-node@v6
if: steps.vendor.outputs.present == 'true'
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
if: steps.vendor.outputs.present == 'true'
- name: Type-check
if: steps.vendor.outputs.present == 'true'
run: pnpm type-check
- name: Build
if: steps.vendor.outputs.present == 'true'
run: pnpm build
- name: Unit tests
if: steps.vendor.outputs.present == 'true'
run: pnpm test
- name: Smoke test
if: steps.vendor.outputs.present == 'true'
run: |
node dist/bin/agentroot.js help > /dev/null
node dist/bin/agentroot.js --version || node dist/bin/agentroot.js help | head -1