Add Custom action for integration and autoconfigure tests (#3)

* Adding template

* Fix template

* bad cut and paste

* must have ./ for local template

* Remove version from local workflows

* Simplify first

* Comment out template and see if startup failure goes away

* Reset

* Local Action for Setup

* Have to checkout local actions

* Debug

* Attempt 2

* Attempt 3

* Add required shell

* Check if action gets env

* Attempt 5

* Integration test Action

* Steps in action must have shell

* Custom action for integration and autoconfigure tests

* Add vertex integration tests jobs

* Workaround for custom action post clean up

* Updated jobs to use custom action

---------

Co-authored-by: Brad Davidson <bradley.c.davidson2.ctr@army.mil>
This commit is contained in:
Brad Davidson
2024-10-03 11:37:40 -06:00
committed by GitHub
parent 29a07c28d2
commit 30a2dcf82b
4 changed files with 192 additions and 309 deletions

View File

@@ -0,0 +1,43 @@
name: "Setup for SpringAI tests"
description: "Setup For SpringAI tests"
inputs:
model-name:
description: "SpringAI Model to integration test"
required: true
runs:
using: "composite"
steps:
- name: Check environment
uses: actions/github-script@v7
with:
script: |
const env = ${{ toJson(env) }}
const emptyEnvEntries = Object.entries(env).filter(e => e[1].length === 0)
emptyEnvEntries.length > 0 &&
core.setFailed('Missing value for environment variable(s): ' + emptyEnvEntries.map(e => e[0]).join(', '));
- name: Check out repository code
uses: actions/checkout@v4
with:
repository: spring-projects/spring-ai
ref: refs/heads/main
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Install
shell: bash
run: ./mvnw install -DskipTests
- name: Run ${{ inputs.model-name }} model tests
shell: bash
run: ./mvnw -pl models/spring-ai-${{ inputs.model-name }} -Pintegration-tests -Dfailsafe.rerunFailingTestsCount=2 verify
- name: workaround - checkout the action again
uses: actions/checkout@v4