-
Notifications
You must be signed in to change notification settings - Fork 1
136 lines (109 loc) · 4.18 KB
/
Copy pathci.yml
File metadata and controls
136 lines (109 loc) · 4.18 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Read tool versions
id: tool_versions
run: ./.github/scripts/read-tool-versions.sh >> "$GITHUB_OUTPUT"
- name: Set up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
version: ${{ steps.tool_versions.outputs.pnpm }}
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ steps.tool_versions.outputs.node }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Record installed pi version
run: |
version=$(node -p "require('./node_modules/@earendil-works/pi-coding-agent/package.json').version")
echo "PI_COMPAT_VERSION=${version}" >> "$GITHUB_ENV"
- name: Check formatting, lint, and types
run: pnpm run check
- name: Run tests
run: pnpm test
- name: Smoke test extension entrypoint
run: pnpm run smoke
- name: Build package bundle
run: pnpm run pack
- name: Verify package contents
run: pnpm pack --dry-run
resolve-pi-compat:
name: Resolve pi compatibility window
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
pi-versions: ${{ steps.pi_versions.outputs.versions }}
latest-pi-version: ${{ steps.pi_versions.outputs.latest }}
oldest-pi-version: ${{ steps.pi_versions.outputs.oldest }}
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Read tool versions
id: tool_versions
run: ./.github/scripts/read-tool-versions.sh >> "$GITHUB_OUTPUT"
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ steps.tool_versions.outputs.node }}
- name: Resolve supported pi versions
id: pi_versions
env:
PI_VERSION_COUNT: 5
run: node ./.github/scripts/resolve-pi-versions.mjs
integration-compat:
name: Integration compatibility (Node ${{ matrix.node-version }}, pi ${{ matrix.pi-target.version }})
needs: resolve-pi-compat
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
node-version:
- 22
- 24
pi-target: ${{ fromJson(needs.resolve-pi-compat.outputs.pi-versions) }}
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Read tool versions
id: tool_versions
run: ./.github/scripts/read-tool-versions.sh >> "$GITHUB_OUTPUT"
- name: Set up pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8
with:
version: ${{ steps.tool_versions.outputs.pnpm }}
- name: Set up Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install pi compatibility target
run: pnpm add -D ${{ matrix.pi-target.piAiSpec }} ${{ matrix.pi-target.piCodingAgentSpec }} --lockfile=false
- name: Run integration tests against pi ${{ matrix.pi-target.version }}
env:
PI_COMPAT_VERSION: ${{ matrix.pi-target.version }}
run: pnpm run test:integration
- name: Summarize compatibility target
run: |
{
echo "## Integration compatibility target"
echo
echo "Resolved compatibility window: ${{ needs.resolve-pi-compat.outputs.pi-versions }}"
echo "This job tested: Node ${{ matrix.node-version }}, pi ${{ matrix.pi-target.version }}"
echo
} >> "$GITHUB_STEP_SUMMARY"