-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (75 loc) · 2.91 KB
/
Copy pathbuild.yaml
File metadata and controls
80 lines (75 loc) · 2.91 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
name: Build Packages & Test
on:
push:
branches:
- main
- v2
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
CI: true
GITHUB_TOKEN: ''
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
AGENTUITY_API_URL: https://api.agentuity.com
AGENTUITY_APP_URL: https://app.agentuity.com
AGENTUITY_TRANSPORT_URL: https://catalyst-usc.agentuity.cloud
AGENTUITY_CATALYST_URL: https://catalyst-usc.agentuity.cloud
AGENTUITY_STREAM_URL: https://streams-usc.agentuity.cloud
AGENTUITY_KEYVALUE_URL: https://catalyst-usc.agentuity.cloud
AGENTUITY_OBJECTSTORE_URL: https://catalyst-usc.agentuity.cloud
AGENTUITY_VECTOR_URL: https://catalyst-usc.agentuity.cloud
AGENTUITY_LOG_LEVEL: info
AGENTUITY_REGION: usc
jobs:
build:
runs-on: blacksmith-4vcpu-ubuntu-2204
timeout-minutes: 15
name: Build
env:
AGENTUITY_USER_ID: ${{ vars.AGENTUITY_USER_ID }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
persist-credentials: false
- name: Setup Node.js
# The CLI is dual-runtime; we smoke-test the built artifact
# under both bun and node, so both must be on PATH.
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '24'
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: "1.3.11"
- name: Install dependencies
run: |
set -eou pipefail
bun install --frozen-lockfile
- name: Setup test credentials
run: |
# Generate CLI API key for whoami command
APIKEY=$(curl "$AGENTUITY_API_URL/cli/auth/short-token" -H 'Content-Type: application/json' --data "{\"secret\":\"${{ secrets.AGENTUITY_APITOKEN_SHARED_SECRET }}\",\"userId\":\"${{ env.AGENTUITY_USER_ID }}\"}" | jq -r '.data.apiKey')
echo "::add-mask::${APIKEY}"
echo "AGENTUITY_CLI_API_KEY=${APIKEY}" >> "$GITHUB_ENV"
- name: Build and Test
timeout-minutes: 15
run: |
set -eou pipefail
bun run build
# Smoke-test the BUILT CLI under both runtimes. The CLI is
# runtime-agnostic; CI proves both invocations produce the
# same result.
bun run whoami
bun run whoami:bun
node packages/cli/bin/cli.js profile show --json
bun packages/cli/bin/cli.js profile show --json
# Run all checks. Integration apps under tests/integration/
# are exercised by package-smoke-test.yaml in their own job.
bun format
bun lint
bun typecheck
bun run test:unit