-
Notifications
You must be signed in to change notification settings - Fork 80
54 lines (45 loc) · 1.28 KB
/
test.yaml
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
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:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: "1.22"
- name: setup test dependencies
if: matrix.options == 'fn-call'
run: |
make test-e2e-dependencies
- name: build binary
run: |
make bin
mv bin/kubectl-ai ${GITHUB_WORKSPACE}/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