Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVEREST-1855 Adjust FE e2e test to use APi server from current commit #1074

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 91 additions & 15 deletions .github/workflows/dev-fe-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,58 @@ on:

jobs:
e2e:
strategy:
fail-fast: false
matrix:
go-version: [ 1.23.x ]
may-fail: [ false ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup Go
- name: Set up Go release
uses: percona-platform/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Set GO_VERSION environment variable
shell: bash
run: |
go version
echo "GO_VERSION=$(go version)" >> $GITHUB_ENV

- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
lfs: true
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Enable Go modules cache
uses: percona-platform/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ matrix.os }}-go-${{ matrix.go-version }}-modules-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ matrix.os }}-go-${{ matrix.go-version }}-modules-

- name: Enable Go build cache
uses: percona-platform/cache@v3
with:
path: ~/.cache/go-build
key: ${{ matrix.os }}-go-${{ matrix.go-version }}-build-${{ github.ref }}-${{ hashFiles('**') }}
restore-keys: |
${{ matrix.os }}-go-${{ matrix.go-version }}-build-${{ github.ref }}-
${{ matrix.os }}-go-${{ matrix.go-version }}-build-

# Switch docker data directory to /mnt to have more space for the local Kubernetes cluster
- name: Switch docker-daemon data directory to /mnt
run: |
sudo systemctl stop docker
echo '{ "exec-opts": ["native.cgroupdriver=cgroupfs"], "cgroup-parent": "/actions_job", "data-root": "/mnt/docker-data" }' | sudo tee /etc/docker/daemon.json
sudo mkdir /mnt/docker-data
sudo systemctl start docker

# Setup Node
- uses: pnpm/action-setup@v4
with:
version: 9.4.0
Expand All @@ -34,19 +80,18 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v4

- name: Set up Go release
uses: percona-platform/setup-go@v4
- name: Start local Kubernetes cluster with the local registry
uses: medyagh/setup-minikube@latest
id: minikube
with:
go-version: 1.23.x
cpus: 4
memory: 4000m
addons: registry
insecure-registry: 'localhost:5000'

- name: Set GO_VERSION environment variable
shell: bash
- name: Expose local registry
run: |
go version
echo "GO_VERSION=$(go version)" >> $GITHUB_ENV

- name: Create KIND cluster
uses: helm/[email protected]
kubectl port-forward --namespace kube-system service/registry 5000:80 &

- name: Set MinIO
run: kubectl apply -f ./.github/minio.conf.yaml
Expand All @@ -67,10 +112,29 @@ jobs:
url=$(kubectl get svc/monitoring-service -o json | jq -r '.spec.clusterIP')
echo -n "MONITORING_URL=http://$url" >> $GITHUB_ENV

- name: Build Everest API Server
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build-debug

- name: Build Everest docker container
uses: docker/metadata-action@v5
id: meta
with:
images: localhost:5000/perconalab/everest
tags:
0.0.0

- name: Build and Push everest dev image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}

- name: Build CLI
shell: bash
run: |
make build-cli
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make build-cli

- name: Install Everest
shell: bash
Expand All @@ -79,12 +143,14 @@ jobs:
--version 0.0.0 \
--version-metadata-url https://check-dev.percona.com \
--skip-wizard \
--skip-db-namespace
--skip-db-namespace \
--helm.set server.image=localhost:5000/perconalab/everest \
--helm.set server.apiRequestsRateLimit=200 \
--helm.set versionMetadataURL=https://check-dev.percona.com

- name: Add everest-ui namespace
shell: bash
run: |
make build-cli
./bin/everestctl namespaces add everest-ui -v \
--operator.mongodb \
--operator.postgresql \
Expand Down Expand Up @@ -128,7 +194,7 @@ jobs:
run: |
kubectl port-forward -n everest-system deployment/everest-server 8080:8080 &

- name: Run Everest
- name: Run Everest UI
shell: bash
run: |
cd ui
Expand Down Expand Up @@ -160,6 +226,16 @@ jobs:
cd ui
pnpm --filter "@percona/everest" e2e

- name: Run debug commands on failure
if: ${{ failure() }}
run: |
kubectl -n everest-system describe pods
kubectl -n everest-monitoring describe pods
kubectl -n everest-system logs deploy/everest-server
kubectl -n pxc-only describe pods
kubectl -n psmdb-only describe pods
kubectl -n pg-only describe pods

- name: Archive report
if: always()
uses: actions/upload-artifact@v4
Expand Down
Loading