Skip to content

chore(core): build libvirt,qemu,edk2 #73

chore(core): build libvirt,qemu,edk2

chore(core): build libvirt,qemu,edk2 #73

Workflow file for this run

# Copyright 2024 Flant JSC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Test
env:
GO_VERSION: "1.22.7"
GINKGO_VERSION: "v2.22.0"
KUBEVIRT_VERSION: "1.3.1"
on:
workflow_dispatch:
inputs:
pr_number:
required: false
type: number
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
branches:
- main
- chore/ci/add-test-kubevirt
push:
branches:
- main
defaults:
run:
shell: bash
concurrency:
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
cancel-in-progress: true
jobs:
kvtest:
runs-on: ubuntu-22.04
name: Run kubevirt tests
steps:
- name: Set up Go ${{ env.GO_VERSION }}
uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Prepare environment
run: |
git clone --depth 1 --branch v"${{ env.KUBEVIRT_VERSION }}" https://github.com/kubevirt/kubevirt.git ./kubevirt
cd ./kubevirt
for p in ../images/virt-artifact/patches/*.patch ; do
echo -n "Apply ${p} ... "
git apply --ignore-space-change --ignore-whitespace ${p} && echo OK || (echo FAIL ; exit 1)
done
go mod edit -go=${{ env.GO_VERSION }}
go mod download
go get github.com/opencontainers/[email protected]
go get github.com/containers/[email protected]
go get github.com/go-openapi/[email protected]
go get github.com/onsi/gomega/matchers/support/goraph/[email protected]
go get github.com/cilium/ebpf/[email protected]
go get github.com/cilium/ebpf/[email protected]
go get golang.org/x/[email protected]
go mod vendor
go install github.com/onsi/ginkgo/v2/ginkgo@${{ env.GINKGO_VERSION }}
- name: Run unit test virt-controller
run: |
cd ./kubevirt
ginkgo -succinct pkg/virt-controller/...