-
Notifications
You must be signed in to change notification settings - Fork 60
77 lines (67 loc) · 2.34 KB
/
go-e2e.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
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: GMC E2e Tests on Xeon
on:
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- microservices-connector/**
- "!microservices-connector/helm/**"
- "!**.md"
- "!**.txt"
- "!**.png"
- .github/workflows/scripts/e2e/gmc_xeon_test.sh
workflow_dispatch:
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-xeon
cancel-in-progress: true
env:
GOSRC_DIR: "microservices-connector"
jobs:
image-build:
uses: ./.github/workflows/reuse-gmc-image-build.yaml
with:
image_tag: ${{ github.event.pull_request.head.sha }}
runner_label: 'docker-build-xeon'
go-e2e:
runs-on: kind-xeon
needs: image-build
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set variables
run: |
echo "SYSTEM_NAMESPACE=opea-system" >> $GITHUB_ENV
echo "APP_NAMESPACE=opea-app" >> $GITHUB_ENV
echo "DOCKER_REGISTRY=${{ needs.image-build.outputs.image_repo }}" >> $GITHUB_ENV
echo "VERSION=${{ needs.image-build.outputs.image_tag }}" >> $GITHUB_ENV
echo "should_cleanup=false" >> $GITHUB_ENV
echo "skip_validate=false" >> $GITHUB_ENV
echo "KIND_MOUNT_DIR=/mnt/huggingface/hub" >> $GITHUB_ENV
- name: Install GMC
run: |
echo "should_cleanup=true" >> $GITHUB_ENV
.github/workflows/scripts/e2e/gmc_install.sh install_gmc
exit_status=$$?$$
if [ $$exit_status -ne 0 ]; then
echo "Failed to install modules"
echo "skip_validate=true" >> $GITHUB_ENV
fi
- name: Run e2e tests
run: |
if $skip_validate; then
echo "Skip validate"
else
.github/workflows/scripts/e2e/gmc_xeon_test.sh validate_gmc
fi
- name: Cleanup modules
if: always()
run: |
if $should_cleanup; then
.github/workflows/scripts/e2e/gmc_xeon_test.sh cleanup_apps
.github/workflows/scripts/e2e/gmc_install.sh cleanup_gmc
fi