Skip to content

Commit 4828f0f

Browse files
tests/e2e: Migrate e2e test for sev andsnp to GHA
This PR is to migrate the AMD SEV and SNP e2e tests from Jenkins to GHA. Builds on top of PR #295 Signed-off-by: Adithya Krishnan Kannan <13063254+AdithyaKrishnan@users.noreply.github.com>
1 parent 016a7d4 commit 4828f0f

File tree

2 files changed

+71
-12
lines changed

2 files changed

+71
-12
lines changed

.github/workflows/ccruntime-pr.yaml

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
name: ccruntime e2e test for PR
22
on:
3-
pull_request_target:
4-
branches:
5-
- 'main'
6-
types:
7-
- opened
8-
- synchronize
9-
- reopened
10-
- labeled
11-
paths-ignore:
12-
- 'docs/**'
13-
3+
pull_request_target:
4+
branches:
5+
- 'main'
6+
types:
7+
- opened
8+
- synchronize
9+
- reopened
10+
- labeled
11+
paths-ignore:
12+
- 'docs/**'
1413
jobs:
14+
e2e-pr-amd:
15+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
16+
uses: ./.github/workflows/ccruntime_e2e_amd.yaml
17+
1518
e2e-pr:
1619
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
1720
uses: ./.github/workflows/ccruntime_e2e.yaml
1821
with:
1922
target-branch: ${{ github.event.pull_request.base.ref }}
20-
commit-hash: ${{ github.event.pull_request.head.sha }}
23+
commit-hash: ${{ github.event.pull_request.head.sha }}
+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: ccruntime e2e tests amd sev
2+
on:
3+
workflow_call:
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
e2e:
10+
name: operator tests
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
runtimeclass:
15+
- "kata-qemu-sev"
16+
- "kata-qemu-snp"
17+
instance:
18+
- "coco-ci-amd-rome-001"
19+
- "coco-ci-amd-milan-001"
20+
exclude:
21+
- runtimeclass: "kata-qemu-snp"
22+
instance: "coco-ci-amd-rome-001"
23+
- runtimeclass: "kata-qemu-sev"
24+
instance: "coco-ci-amd-milan-001"
25+
26+
runs-on: [self-hosted]
27+
steps:
28+
- name: Take a pre-action for self-hosted runner
29+
run: |
30+
if [ -f ${HOME}/script/pre_action.sh ]; then
31+
${HOME}/script/pre_action.sh cc-operator
32+
fi
33+
34+
- uses: actions/checkout@v4
35+
36+
- name: Install deps
37+
run: |
38+
sudo apt-get update -y
39+
sudo apt-get install -y ansible python-is-python3
40+
41+
- name: Run e2e tests
42+
timeout-minutes: 45
43+
run: |
44+
cd tests/e2e
45+
export PATH="$PATH:/usr/local/bin"
46+
args="-u"
47+
./run-local.sh -r "${{ matrix.runtimeclass }}" "${args}"
48+
env:
49+
RUNNING_INSTANCE: ${{ matrix.instance }}
50+
51+
- name: Take a post-action
52+
if: always()
53+
run: |
54+
if [ -f ${HOME}/script/post_action.sh ]; then
55+
${HOME}/script/post_action.sh cc-operator
56+
fi

0 commit comments

Comments
 (0)