Skip to content

test

test #194

Workflow file for this run

name: test
on:
workflow_dispatch:
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 240
strategy:
fail-fast: false
matrix:
options:
- fn-call
- non-fn-call
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: "1.22"
- name: setup test dependencies
run: |
make test-e2e-dependencies
- name: build binary
run: |
make bin
- name: create kind cluster
run: |
# used to retrieve the k8s api for fn-call and apply the manifest
kind create cluster
- name: run tests
shell: bash
run: |
if [[ ${{ matrix.options }} == 'fn-call' ]]; then
FN_CALL="--use-k8s-api"
fi
kubectl ai "create an nginx deployment with 3 replicas" --require-confirmation=false ${FN_CALL}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_DEPLOYMENT_NAME: ${{ secrets.OPENAI_DEPLOYMENT_NAME }}
OPENAI_ENDPOINT: ${{ secrets.OPENAI_ENDPOINT }}
- run: |
kubectl get deployments
kubectl get pods