Skip to content

Commit

Permalink
Merge pull request #237 from steadybit/refa/parallel-e2e
Browse files Browse the repository at this point in the history
build: run e2e tests for different runtimes in parallel
  • Loading branch information
joshiste authored Dec 19, 2024
2 parents bcf702f + 2e1a313 commit 928e950
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 5 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,49 @@ concurrency:
cancel-in-progress: true

jobs:
e2e-tests:
name: E2E Tests (${{ matrix.e2e-runtime }})
runs-on: steadybit_runner_ubuntu_latest_4cores_16GB
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
e2e-runtime: ['docker', 'containerd', 'cri-o']
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Remove non-semver tags (from helmchart) for goreleaser to work properly
run: |
git tag -d $(git tag -l | grep -v "^v[0-9]*.[0-9]*.[0-9]*")
- uses: actions/setup-go@v5
with:
go-version: '1.23'

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
sudo apt-get update
sudo apt-get install -y libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils qemu qemu-system-x86
sudo usermod -a -G kvm,libvirt $USER
- name: Audit
run: |
make prepare_audit
go mod download
echo 'exec in a new sell for the group change to take effect'
sudo -u $USER env "PATH=$PATH" "E2E_RUNTIMES=${{ matrix.e2e-runtime }}" make e2e-test
extension-ci:
uses: steadybit/extension-kit/.github/workflows/reusable-extension-ci.yml@main
needs: [e2e-tests]
with:
go_version: '1.23'
runs_on: steadybit_runner_ubuntu_latest_4cores_16GB
use_kvm: true
run_make_prepare_audit: true
build_linux_packages: true
VERSION_BUMPER_APPID: ${{ vars.GH_APP_STEADYBIT_APP_ID }}
secrets:
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,22 @@ prepare_audit:
minikube config set cpus max
minikube config set memory 8g

## audit: run quality control checks
## audit: run quality control checks - in CI we run the e2e tests separate
.PHONY: audit
audit:
go vet ./...
go run honnef.co/go/tools/cmd/staticcheck@latest -checks=all,-SA1019,-ST1000,-U1000,-ST1003 ./...
go test -race -vet=off -coverprofile=coverage.out -timeout 35m -v ./...
go mod verify
ifeq ($(CI), true)
go test -race -vet=off -coverprofile=coverage.out -timeout 35m -v $(shell go list ./... | grep -v /e2e)
else
go test -race -vet=off -coverprofile=coverage.out -timeout 35m -v ./...
endif

## e2e: run quality control checks
.PHONY: e2e-test
e2e-test:
go test -race -vet=off -coverprofile=e2e-coverage.out -timeout 35m -v ./e2e/...

## charttesting: Run Helm chart unit tests
.PHONY: charttesting
Expand Down

0 comments on commit 928e950

Please sign in to comment.