generated from kyma-project/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (58 loc) · 1.79 KB
/
reusable-k3d-agent-test.yml
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
name: Run compass-runtime-agent integration tests on k3d
on:
workflow_call:
inputs:
k3d-version:
required: true
type: string
default: v5.6.0
secrets:
compass-host:
required: true
compass-client-id:
required: true
compass-client-secret:
required: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: azure/setup-helm@v4.1.0
id: install-helm
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Set up go environment
uses: actions/setup-go@v4
with:
go-version: 1.23.1
- name: install-k3d
env:
K3D_URL: https://github.com/raw/k3d-io/k3d/main/install.sh
DEFAULT_K3D_VERSION: ${{ inputs.k3d-version }}
run: curl --silent --fail $K3D_URL | TAG=$DEFAULT_K3D_VERSION bash
- name: run-tests
env:
COMPASS_CLIENT_ID: ${{ secrets.compass-client-id }}
COMPASS_CLIENT_SECRET: ${{ secrets.compass-client-secret }}
COMPASS_HOST: ${{ secrets.compass-host }}
run: make -C tests/hack/ci k3d-agent-tests
- name: archive-logs
if: always()
uses: actions/upload-artifact@v4
with:
name: k3d-agent-test-logs
path: compass-runtime-agent-test.log
- name: test summary
run: |
{
echo "# K3D Agent Test Summary:"
echo "<details>"
echo "<summary>Click to expand logs</summary>"
printf '\n```\n'
cat compass-runtime-agent-test.log
printf '\n```\n'
echo "</details>"
} >> $GITHUB_STEP_SUMMARY