This repository was archived by the owner on Apr 17, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
90 lines (77 loc) · 2.43 KB
/
Copy pathci.yml
File metadata and controls
90 lines (77 loc) · 2.43 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: CI
on:
pull_request:
push:
branches:
- master
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
changeset:
name: Changeset check
runs-on: ubuntu-latest
# Only check PRs, not direct pushes to master.
# Skip the automated "Version Packages" release PR created by changesets/action.
# Skip PRs labelled `skip-changeset` (for docs-only / CI-only / internal changes).
if: |
github.event_name == 'pull_request' &&
github.head_ref != 'changeset-release/master' &&
!contains(github.event.pull_request.labels.*.name, 'skip-changeset')
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
# Fetch base branch so we can diff against it.
fetch-depth: 0
- name: Check for changeset
run: |
BASE="origin/${{ github.base_ref }}"
FILES=$(git diff --name-only "$BASE"...HEAD -- '.changeset/' \
| grep -E '^\.changeset/.+\.md$' \
| grep -v '^\.changeset/README\.md$' \
|| true)
if [ -z "$FILES" ]; then
echo "::error::No changeset found for this PR."
echo ""
echo "Run 'pnpm changeset' to generate one."
echo "If this PR intentionally needs no changeset (docs-only, CI-only,"
echo "internal refactor), add the 'skip-changeset' label to the PR."
exit 1
fi
echo "Changeset(s) found:"
echo "$FILES"
verify:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Detect sandbox changes
id: sandbox
uses: dorny/paths-filter@v3
with:
filters: |
changed:
- 'docker/sandbox/**'
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build:packages
- name: Run package tests
run: pnpm test
- name: Run type checks
run: pnpm typecheck
- name: Build sandbox image
if: steps.sandbox.outputs.changed == 'true'
run: docker build -t agentrail-sandbox:ci docker/sandbox