Repository navigation
135 lines (126 loc) · 5.21 KB
/
Copy pathintegration.yml
File metadata and controls
135 lines (126 loc) · 5.21 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
name: Cross-repo integration
# activeagent, actionagent and solid_agent release independently, and
# solid_agent depends on the framework — so each repository's own suite can
# be green while the combination people install is broken. This workflow is
# the thing that runs them together.
#
# Two configurations, both meaningful:
#
# source this checkout against solid_agent's main branch, with
# SOLID_AGENT_STRICT=1 so a test that would skip fails instead.
# This is what the two repositories are developing toward.
#
# released this checkout against whatever solid_agent Bundler resolves
# from RubyGems — the combination a user gets today. Tests skip
# what the released gem cannot do, and the skips are printed to
# the job summary, so the gap between the gem and its source is
# visible rather than assumed.
#
# Called by ci.yml on every pull request, by release.yml before publishing,
# by solid_agent's CI (via repository_dispatch) when that repo changes, and
# nightly so drift surfaces without anyone pushing.
on:
workflow_call:
inputs:
solid_agent_ref:
description: solid_agent branch, tag or SHA to test against
type: string
default: main
workflow_dispatch:
inputs:
solid_agent_ref:
description: solid_agent branch, tag or SHA to test against
type: string
default: main
repository_dispatch:
types: [ solid-agent-changed ]
schedule:
- cron: "0 6 * * *"
# Runs here rather than through ci.yml on main. A workflow_call run is
# attributed to the caller, so this workflow had no runs of its own and
# its status badge read "no status" however often the suite passed.
# ci.yml keeps calling it for pull requests, where the badge is irrelevant
# and one combined check is what reviewers want.
push:
branches: [ main ]
jobs:
integration:
name: ${{ matrix.configuration }} solid_agent
runs-on: ubuntu-latest
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
CI: true
RAILS_ENV: test
ANTHROPIC_API_KEY: ANTHROPIC_API_KEY
OPEN_AI_API_KEY: OPEN_AI_API_KEY
OPEN_ROUTER_API_KEY: OPEN_ROUTER_API_KEY
strategy:
fail-fast: false
matrix:
include:
- configuration: source
gemfile: gemfiles/solid_agent_main.gemfile
strict: "1"
- configuration: released
gemfile: gemfiles/rails8.gemfile
strict: ""
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/system-deps
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
SOLID_AGENT_REF: ${{ inputs.solid_agent_ref || github.event.client_payload.solid_agent_ref || 'main' }}
- name: Setup database
working-directory: test/dummy
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
SOLID_AGENT_REF: ${{ inputs.solid_agent_ref || github.event.client_payload.solid_agent_ref || 'main' }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: |
bundle exec ruby bin/rails db:create
bundle exec ruby bin/rails db:migrate
- name: Report the resolved versions
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
SOLID_AGENT_REF: ${{ inputs.solid_agent_ref || github.event.client_payload.solid_agent_ref || 'main' }}
run: |
{
echo "### ${{ matrix.configuration }} combination"
echo
echo '```'
bundle list | grep -E "activeagent|actionagent|solid_agent" || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
# The engine's own suite runs here too, not just the integration
# directory: ActionAgent::AgentExecutionService builds an agent class
# around SolidAgent::HasContext, and that path is only exercised by
# actionagent/test. The workbench file carries the rest of that
# coupling — load_context(context_id:), add_user_message's attachments,
# and the two persist_*_to_context overrides.
- name: Run the integration suite
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
SOLID_AGENT_REF: ${{ inputs.solid_agent_ref || github.event.client_payload.solid_agent_ref || 'main' }}
SOLID_AGENT_STRICT: ${{ matrix.strict }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: |
bin/test test/integration/solid_agent/*_test.rb \
actionagent/test/agent_execution_service_test.rb \
actionagent/test/runner_workbench_test.rb 2>&1 | tee integration.log
# Skips are the report: on the released combination they name every
# API the published gem is missing, which is the cue to cut a
# solid_agent release.
- name: Summarize what the resolved gem could not cover
if: always()
run: |
{
echo
echo '```'
grep -E "does not provide|skips" integration.log || echo "nothing skipped"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"