mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-04-27 11:30:52 +00:00
69 lines
2.3 KiB
YAML
69 lines
2.3 KiB
YAML
name: End to end tests
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'README.md'
|
|
|
|
jobs:
|
|
e2e-tests:
|
|
runs-on: self-hosted
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- label: "local-encryption"
|
|
- label: "remote-auto"
|
|
- label: "remote-static"
|
|
- label: "remote-https-pinned"
|
|
- label: "remote-https-bad-cert"
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Install Go
|
|
uses: actions/setup-go@v3
|
|
- name: Run tests
|
|
env:
|
|
LABEL: ${{ matrix.label }}
|
|
KVM: true
|
|
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
|
|
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
|
|
|
|
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
|
|
|
|
# We run with sudo to be able to access /dev/kvm
|
|
sudo -E ./scripts/e2e-tests.sh
|