forked from opendatahub-io/kuberay
-
Notifications
You must be signed in to change notification settings - Fork 0
112 lines (96 loc) · 2.98 KB
/
Copy pathe2e-tests.yaml
File metadata and controls
112 lines (96 loc) · 2.98 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: E2E Tests
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- '**'
push:
branches:
- dev
- 'release-*'
concurrency:
group: ${{ github.head_ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
OPERATOR_IMG: quay.io/opendatahub/kuberay-operator:dev
KUBERAY_TEST_TIMEOUT_SHORT: 5m
KUBERAY_TEST_TIMEOUT_MEDIUM: 12m
KUBERAY_TEST_TIMEOUT_LONG: 15m
KUBERAY_TEST_RAY_IMAGE: rayproject/ray:2.52.1
jobs:
build-operator:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: v1.25
- name: Build operator image
run: |
cd ray-operator
make docker-build IMG="${OPERATOR_IMG}" ENGINE=docker
docker save -o /tmp/operator.tar "${OPERATOR_IMG}"
- name: Upload operator image
uses: actions/upload-artifact@v4
with:
name: operator-image
retention-days: 1
path: /tmp/operator.tar
e2e-rayjob:
needs: build-operator
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false) }}
strategy:
fail-fast: false
matrix:
test:
- TestRayJob
- TestRayJobSuspend
- TestRayJobLightWeightMode
- TestRayJobWithClusterSelector
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: v1.25
- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download operator image
uses: actions/download-artifact@v4
with:
name: operator-image
- name: Load operator image
run: docker load -i operator.tar
- name: Setup and start KinD cluster
uses: ./.github/workflows/actions/kind
- name: Run RayJob e2e test
env:
IMG: ${{ env.OPERATOR_IMG }}
SKIP_BUILD: "1"
run: |
chmod +x ./scripts/run-e2e-rayjob-kind.sh
./scripts/run-e2e-rayjob-kind.sh --json --test "${{ matrix.test }}"
- name: Print KubeRay operator logs
if: always()
run: |
echo "Printing KubeRay operator logs"
kubectl logs -n default --tail=-1 -l app.kubernetes.io/name=kuberay-operator | tee "./kuberay-operator-${{ matrix.test }}.log"
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.test }}
retention-days: 10
path: |
**/*.log