-
Notifications
You must be signed in to change notification settings - Fork 70
48 lines (40 loc) · 1.48 KB
/
agent-lint-and-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
name: Lint and Test Prefect Agent Chart
on:
pull_request:
paths:
- .github/workflows/agent-lint-and-test.yaml
- .github/linters/agent-ct.yaml
- 'charts/prefect-agent/**'
jobs:
lint-test:
name: "lint-test (${{ matrix.kubernetes }})"
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes:
- "1.25.8"
- "1.26.3"
- "1.27.0"
fail-fast: false
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Helm
uses: azure/setup-helm@v3.5
with:
version: v3.11.2
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0
- name: Run chart-testing (lint)
run: ct lint --config .github/linters/agent-ct.yaml
- name: Create kind cluster
uses: helm/kind-action@v1.5.0
with:
version: v0.18.0
node_image: "kindest/node:v${{ matrix.kubernetes }}"
- name: Create API Secret for Agent Chart
run: |
kubectl create ns prefect
kubectl create secret generic prefect-api-key --from-literal=key=${{ secrets.PREFECT_CLOUD_API_KEY }} -n prefect
- name: Run chart-testing (install)
run: ct install --config .github/linters/agent-ct.yaml --helm-extra-set-args "--set=agent.config.workQueueName=test-helm --set=agent.cloudApiConfig.accountId=${{ secrets.PREFECT_CLOUD_ACCOUNT_ID }} --set=agent.cloudApiConfig.workspaceId=${{ secrets.PREFECT_CLOUD_WORKSPACE_ID }}"