mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-10-21 11:29:46 +00:00
Bump ghw and fix label (#17)
* Bump ghw and fix label old label was the new FilesystemLabel. Now the label refers to the partition label which is different Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * bump deps Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * Rework ginkgo Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * docker login Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * [Will drop]Allow building kcrypt from branches Otherwise any changes that need both wont pass tests. Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * Dont build the iso 5 times Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * This confirms Im dumb and dont know how to program Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * debug logs Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * debug Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * 🤖 run in github CI Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * Debug Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * debug Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> * Add /tmp/oem to scan dirs for config Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com> --------- Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
100
.github/workflows/e2e-tests.yml
vendored
100
.github/workflows/e2e-tests.yml
vendored
@@ -10,8 +10,51 @@ on:
|
||||
- 'README.md'
|
||||
|
||||
jobs:
|
||||
build-iso:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ^1.20
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_LOGIN }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
- name: Install earthly
|
||||
uses: Luet-lab/luet-install-action@v1
|
||||
with:
|
||||
repository: quay.io/kairos/packages
|
||||
packages: utils/earthly
|
||||
- name: build iso
|
||||
run: |
|
||||
# Configure earthly to use the docker mirror in CI
|
||||
# https://docs.earthly.dev/ci-integration/pull-through-cache#configuring-earthly-to-use-the-cache
|
||||
mkdir -p ~/.earthly/
|
||||
cat << EOF > ~/.earthly/config.yml
|
||||
global:
|
||||
buildkit_additional_config: |
|
||||
[registry."docker.io"]
|
||||
mirrors = ["registry.docker-mirror.svc.cluster.local:5000"]
|
||||
[registry."registry.docker-mirror.svc.cluster.local:5000"]
|
||||
insecure = true
|
||||
EOF
|
||||
|
||||
earthly -P +iso
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: challenger.iso.zip
|
||||
path: |
|
||||
build/*.iso
|
||||
e2e-tests:
|
||||
runs-on: self-hosted
|
||||
needs:
|
||||
- build-iso
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -30,41 +73,38 @@ jobs:
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ^1.20
|
||||
- name: Run tests
|
||||
env:
|
||||
LABEL: ${{ matrix.label }}
|
||||
KVM: true
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_LOGIN }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
- name: Install deps
|
||||
run: |
|
||||
sudo apt update && \
|
||||
sudo apt install -y git qemu-system-x86 qemu-utils swtpm jq make glibc-tools \
|
||||
openssl curl gettext ca-certificates curl gnupg lsb-release
|
||||
|
||||
curl -L https://github.com/mudler/luet/releases/download/0.33.0/luet-0.33.0-linux-amd64 -o luet
|
||||
curl -L https://github.com/mudler/luet/releases/download/0.33.0/luet-0.33.0-linux-amd64 -o luet
|
||||
chmod +x luet
|
||||
sudo mv luet /usr/bin/luet
|
||||
sudo mkdir -p /etc/luet/repos.conf.d/
|
||||
sudo luet repo add -y kairos --url quay.io/kairos/packages --type docker
|
||||
LUET_NOLOCK=true sudo -E luet install -y container/kubectl utils/k3d utils/earthly
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: challenger.iso.zip
|
||||
- name: Run tests
|
||||
env:
|
||||
LABEL: ${{ matrix.label }}
|
||||
run: |
|
||||
sudo apt update && \
|
||||
sudo apt install -y git qemu-system-x86 qemu-utils swtpm jq make glibc-tools \
|
||||
openssl curl gettext ca-certificates curl gnupg lsb-release
|
||||
|
||||
earthly -P +iso
|
||||
export ISO=$PWD/build/challenger.iso
|
||||
|
||||
go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
|
||||
go get github.com/onsi/gomega/...
|
||||
go get github.com/onsi/ginkgo/v2/ginkgo/internal@v2.7.1
|
||||
go get github.com/onsi/ginkgo/v2/ginkgo/generators@v2.7.1
|
||||
go get github.com/onsi/ginkgo/v2/ginkgo/labels@v2.7.1
|
||||
|
||||
# Configure earthly to use the docker mirror in CI
|
||||
# https://docs.earthly.dev/ci-integration/pull-through-cache#configuring-earthly-to-use-the-cache
|
||||
cat << EOF > ~/.earthly/config.yml
|
||||
global:
|
||||
buildkit_additional_config: |
|
||||
[registry."docker.io"]
|
||||
mirrors = ["registry.docker-mirror.svc.cluster.local:5000"]
|
||||
[registry."registry.docker-mirror.svc.cluster.local:5000"]
|
||||
insecure = true
|
||||
EOF
|
||||
export ISO=$PWD/$(ls *.iso)
|
||||
|
||||
# We run with sudo to be able to access /dev/kvm
|
||||
sudo -E ./scripts/e2e-tests.sh
|
||||
./scripts/e2e-tests.sh
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: ${{ matrix.label }}-test.logs.zip
|
||||
path: tests/**/logs/*
|
||||
if-no-files-found: warn
|
Reference in New Issue
Block a user