-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 2.1 KB
/
examples.yml
File metadata and controls
74 lines (62 loc) · 2.1 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
# Tutorial Examples CI
# Runs examples across all three providers on a MWF schedule
# Cost estimate: 3 examples x 3 providers x 12 runs/month = ~$10-15/month
# Ceiling: $50/month — re-estimate when examples 04+ added
name: Tutorial Examples
on:
schedule:
- cron: '0 6 * * 1,3,5' # MWF at 6am UTC
workflow_dispatch:
pull_request:
branches: [main]
concurrency:
group: examples-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
if: github.repository_owner == 'spring-ai-community'
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
example: [01-create-file]
provider:
- name: claude
cli-install: npm install -g @anthropic-ai/claude-code
- name: codex
cli-install: npm install -g @openai/codex
- name: gemini
cli-install: npm install -g @anthropic-ai/gemini-cli
name: ${{ matrix.example }} / ${{ matrix.provider.name }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install CLI
run: ${{ matrix.provider.cli-install }}
continue-on-error: true
- name: Compile example
run: |
./mvnw compile -pl ${{ matrix.example }} \
-P${{ matrix.provider.name }} -P'!claude' \
-B --no-transfer-progress
# Runtime test commented out until secrets are configured
# - name: Run example
# env:
# ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
# GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
# GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
# run: |
# ./mvnw spring-boot:run -pl ${{ matrix.example }} \
# -Dspring.profiles.active=${{ matrix.provider.name }} \
# -B --no-transfer-progress