mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
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:
parent
a3180d0cb8
commit
bc152b1141
4
.github/workflows/ci-on-push.yaml
vendored
4
.github/workflows/ci-on-push.yaml
vendored
@ -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
|
||||
|
15
.github/workflows/run-launchtimes-metrics.yaml
vendored
Normal file
15
.github/workflows/run-launchtimes-metrics.yaml
vendored
Normal 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
35
tests/metrics/gha-run.sh
Executable 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 "$@"
|
Loading…
Reference in New Issue
Block a user