gha: ci-on-push: Run metrics tests

This gh-workflow prints a simple msg, but is the base for future
PRs that will gradually add the jobs corresponding to the kata
metrics test.

Fixes: #7100

Signed-off-by: David Esparza <david.esparza.borquez@intel.com>
This commit is contained in:
David Esparza 2023-06-13 15:56:43 -06:00
parent a3180d0cb8
commit bc152b1141
No known key found for this signature in database
GPG Key ID: EABE0B1A98CC3B7A
3 changed files with 54 additions and 0 deletions

View File

@ -52,3 +52,7 @@ jobs:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-amd64
run-metrics-tests:
needs: build-kata-static-tarball-amd64
uses: ./.github/workflows/run-launchtimes-metrics.yaml

View File

@ -0,0 +1,15 @@
name: CI | Run launch-times metrics
on:
workflow_call:
jobs:
launch-times-tests:
runs-on: metrics
env:
GOPATH: ${{ github.workspace }}
steps:
- name: run launch times on qemu
run: bash tests/metrics/gha-run.sh run-test-launchtimes-qemu
- name: run launch times on clh
run: bash tests/metrics/gha-run.sh run-test-launchtimes-clh

35
tests/metrics/gha-run.sh Executable file
View File

@ -0,0 +1,35 @@
#!/bin/bash
#
# Copyright (c) 2023 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
set -o errexit
set -o nounset
set -o pipefail
metrics_dir="$(dirname "$(readlink -f "$0")")"
function run_test_launchtimes() {
hypervisor="${1}"
echo "Running launchtimes tests: "
if [ "${hypervisor}" = 'qemu' ]; then
echo "qemu"
elif [ "${hypervisor}" = 'clh' ]; then
echo "clh"
fi
}
function main() {
action="${1:-}"
case "${action}" in
run-test-launchtimes-qemu) run_test_launchtimes "qemu" ;;
run-test-launchtimes-clh) run_test_launchtimes "clh" ;;
*) >&2 echo "Invalid argument"; exit 2 ;;
esac
}
main "$@"