Skip to content

Commit 92d4a63

Browse files
committed
CARRY: Run test CI on all PRs
1 parent cc3ba2f commit 92d4a63

File tree

8 files changed

+84
-13
lines changed

8 files changed

+84
-13
lines changed

.github/workflows/actions/kind/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ runs:
3737
- name: Setup KinD cluster
3838
uses: helm/[email protected]
3939
with:
40-
cluster_name: cluster
40+
cluster_name: kind
4141
version: v0.17.0
4242
config: ${{ env.KIND_CONFIG_FILE }}
4343

.github/workflows/actions/kind/kind.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ kind: Cluster
22
apiVersion: kind.x-k8s.io/v1alpha4
33
nodes:
44
- role: control-plane
5-
image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1
5+
image: kindest/node:v1.30.8@sha256:17cd608b3971338d9180b00776cb766c50d0a0b6b904ab4ff52fd3fc5c6369bf
66
kubeadmConfigPatches:
77
- |
88
kind: InitConfiguration

.github/workflows/consistency-check.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ name: operator-consistency-check
33
on:
44
push:
55
branches:
6-
- master
6+
- dev
77
- release-*
88
pull_request:
99
branches:
10-
- master
11-
- release-*
10+
- '**'
1211

1312
jobs:
1413
# Check consistency between types.go and generated API.

.github/workflows/e2e-tests.yaml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: E2E Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '**'
7+
push:
8+
branches:
9+
- dev
10+
- 'release-*'
11+
12+
concurrency:
13+
group: ${{ github.head_ref }}-${{ github.workflow }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
with:
23+
submodules: recursive
24+
25+
- name: Set up Go
26+
uses: actions/setup-go@v3
27+
with:
28+
go-version: v1.22
29+
30+
- name: Set up gotestfmt
31+
uses: gotesttools/gotestfmt-action@v2
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Setup and start KinD cluster
36+
uses: ./.github/workflows/actions/kind
37+
38+
- name: Deploy Kuberay operator
39+
id: deploy
40+
run: |
41+
echo "Deploying Kuberay operator"
42+
cd ray-operator
43+
44+
IMG=quay.io/opendatahub/kuberay-operator:dev
45+
make docker-build -e IMG="${IMG}" -e ENGINE=docker
46+
kind load docker-image ${IMG}
47+
48+
make deploy -e IMG="${IMG}"
49+
kubectl wait --timeout=90s --for=condition=Available=true deployment -n default kuberay-operator
50+
51+
- name: Run e2e tests
52+
run: |
53+
export KUBERAY_TEST_TIMEOUT_SHORT=3m
54+
export KUBERAY_TEST_TIMEOUT_MEDIUM=10m
55+
export KUBERAY_TEST_TIMEOUT_LONG=15m
56+
57+
set -euo pipefail
58+
cd ray-operator
59+
go test -timeout 30m -v ./test/e2e -json 2>&1 | tee ./gotest.log | gotestfmt
60+
61+
- name: Print KubeRay operator logs
62+
if: steps.deploy.outcome == 'success'
63+
run: |
64+
echo "Printing KubeRay operator logs"
65+
kubectl logs -n default --tail -1 -l app.kubernetes.io/name=kuberay-operator app.kubernetes.io/name=kuberay | tee ./kuberay-operator.log
66+
67+
- name: Upload logs
68+
uses: actions/upload-artifact@v4
69+
with:
70+
name: logs
71+
retention-days: 10
72+
path: |
73+
**/*.log

.github/workflows/helm-lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Lint and Test Charts
33
on:
44
push:
55
branches:
6-
- master
6+
- dev
77
- release-*
88
pull_request:
99
branches:
10-
- master
10+
- dev
1111
- release-*
1212

1313
jobs:

.github/workflows/test-job.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ name: Go-build-and-test
33
on:
44
push:
55
branches:
6-
- master
6+
- dev
77
- release-*
88
pull_request:
99
branches:
10-
- master
11-
- release-*
10+
- '**'
1211

1312
jobs:
1413
lint:

ray-operator/DEVELOPMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ make clean
6363

6464
```bash
6565
# Step 1: Create a Kind cluster
66-
kind create cluster --image=kindest/node:v1.24.0
66+
kind create cluster --image=kindest/node:v1.27.3
6767

6868
# Step 2: Modify KubeRay source code
6969
# For example, add a log by adding setupLog.Info("Hello KubeRay") in the function `main` in `main.go`.
@@ -106,7 +106,7 @@ kubectl logs {YOUR_OPERATOR_POD} | grep "Hello KubeRay"
106106
107107
```bash
108108
# Step 1: Create a Kind cluster
109-
kind create cluster --image=kindest/node:v1.24.0
109+
kind create cluster --image=kindest/node:v1.27.3
110110

111111
# Step 2: Install CRDs
112112
make -C ray-operator install

ray-operator/config/openshift/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ commonLabels:
3636
app.kubernetes.io/component: kuberay-operator
3737

3838
patches:
39-
- path: remove_default_namespace.yaml
39+
# - path: remove_default_namespace.yaml
4040
- path: kuberay-operator-image-patch.yaml
4141
target:
4242
group: apps

0 commit comments

Comments
 (0)