forked from ray-project/kuberay
-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (78 loc) · 2.45 KB
/
e2e-tests.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: e2e
on:
pull_request:
branches:
- master
- 'release-*'
paths-ignore:
- 'apiserver/**'
- 'cli/**'
- 'docs/**'
- '**.adoc'
- '**.md'
- 'LICENSE'
push:
branches:
- master
- 'release-*'
paths-ignore:
- 'apiserver/**'
- 'cli/**'
- 'docs/**'
- '**.adoc'
- '**.md'
- 'LICENSE'
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
ray-operator:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: v1.20
- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup and start KinD cluster
uses: ./.github/workflows/actions/kind
- name: Deploy Kuberay operator
id: deploy
run: |
echo Deploying Kuberay operator
cd ray-operator
IMG="${REGISTRY_ADDRESS}"/kuberay
make docker-build -e IMG="${IMG}" -e ENGINE=podman
make docker-push -e IMG="${IMG}" -e ENGINE=podman
make deploy -e IMG="${IMG}"
kubectl wait --timeout=90s --for=condition=Available=true deployment -n ray-system kuberay-operator
- name: Run e2e tests
run: |
export KUBERAY_TEST_TIMEOUT_SHORT=1m
export KUBERAY_TEST_TIMEOUT_MEDIUM=5m
export KUBERAY_TEST_TIMEOUT_LONG=10m
export KUBERAY_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }}
echo "KUBERAY_TEST_OUTPUT_DIR=${KUBERAY_TEST_OUTPUT_DIR}" >> $GITHUB_ENV
set -euo pipefail
cd ray-operator
go test -timeout 30m -v ./test/e2e -json 2>&1 | tee ${KUBERAY_TEST_OUTPUT_DIR}/gotest.log | gotestfmt
- name: Print KubeRay operator logs
if: always() && steps.deploy.outcome == 'success'
run: |
echo "Printing KubeRay operator logs"
kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay | tee ${KUBERAY_TEST_OUTPUT_DIR}/kuberay-operator.log
- name: Upload logs
uses: actions/upload-artifact@v3
if: always() && steps.deploy.outcome == 'success'
with:
name: logs
retention-days: 10
path: |
${{ env.KUBERAY_TEST_OUTPUT_DIR }}/**/*.log