Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PMM-12921 added suites (#657)
Browse files Browse the repository at this point in the history
* PMM-12296 added all jobs

* PMM-12296 switched version getter

* PMM-12921 Added 2 fb groups

* PMM-12921 Added 2 fb groups
vyarosh authored and saikumar-vs committed Jul 9, 2024
1 parent 6b33600 commit d9d8a1b
Showing 9 changed files with 574 additions and 19 deletions.
245 changes: 245 additions & 0 deletions .github/workflows/fb-e2e-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
name: _FB e2e tests

on:
workflow_dispatch:
inputs:
pmm_server_image:
description: "pmm-server docker image, default perconalab/pmm-server:dev-latest"
required: false
type: string
pmm_client_version:
description: "pmm2-client version Tarball or Dev-latest, default is dev-latest"
required: false
type: string
pmm_client_image:
description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest"
required: false
type: string
pmm_qa_branch:
description: "Branch for PMM-QA to checkout"
required: false
type: string
pmm_ui_branch:
description: "Branch for PMM-UI tests to checkout"
required: false
type: string
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

workflow_call:
inputs:
pmm_server_image:
description: "pmm-server docker image, default perconalab/pmm-server:dev-latest"
required: false
type: string
pmm_client_version:
description: "pmm2-client version Tarball URL or Dev-latest, default is dev-latest"
required: false
type: string
pmm_client_image:
description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest"
required: false
type: string
pmm_qa_branch:
description: "Branch for PMM-QA to checkout"
required: false
type: string
pmm_ui_branch:
description: "Branch for PMM-UI tests to checkout"
required: false
type: string
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

secrets:
BACKUP_LOCATION_ACCESS_KEY:
required: false
BACKUP_LOCATION_SECRET_KEY:
required: false

jobs:
backup_management_mongo:
name: Backup Management MongoDB UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--mongo-replica-for-backup'
tags_for_tests: '@bm-mongo'

# -- include backup_management_ps once setup for mysql fixed for the worker
# backup_management_ps:
# name: Backup Management PS UI tests
# uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
# secrets: inherit
# with:
# pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
# pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
# pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
# pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
# pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
# sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
# client_flags: '--mongo-replica-for-backup --setup-bm-mysql'
# tags_for_tests: '@bm-mysql'

backup_management_common:
name: Backup Management Common and Locations UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--mongo-replica-for-backup --setup-bm-mysql'
# tags_for_tests: '@bm-common|@bm-locations' -- include bm-common once setup for mysql fixed
tags_for_tests: '@bm-locations'

exporters:
name: Exporters tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--mongo-replica-for-backup'
tags_for_tests: '@mongodb-exporter|@exporters'

instances:
name: Instances UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--addclient=haproxy,1 --addclient=ps,1 --setup-external-service'
tags_for_tests: '@instances-fb'

alerting_and_settings:
name: Alerting and Settings UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--addclient=ms,1'
tags_for_tests: '@alerting-fb|@settings-fb'

user_and_password:
name: User with changed password UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--addclient=ps,1 --addclient=modb,1 --addclient=pdpgsql,1'
tags_for_tests: '@user-password'

pgsm:
name: PGSM UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--setup-pmm-pgsm-integration'
tags_for_tests: '@pgsm-pmm-integration'

pgss:
name: PGSS UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--setup-pmm-pgss-integration'
tags_for_tests: '@pgss-pmm-integration'

rbac:
name: RBAC UI tests
uses: percona/pmm-qa/.github/workflows/runner-e2e-tests-playwright.yml@main
secrets: inherit
with:
pmm_ui_tests_branch: ${{ inputs.pmm_ui_branch || 'main '}}
pmm_test_flag: '@rbac'
pmm_server_version: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_clients: '--addclient=ps,1'
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}

psmdb_arbiter:
name: PSMDB Arbiter Replica UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--mongomagic --with-arbiter'
tags_for_tests: '@pmm-psmdb-arbiter-integration'

user_and_password_podman:
name: User with changed password UI tests
uses: ./.github/workflows/ui-tests-podman.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--addclient=ps,1 --addclient=modb,1 --addclient=pdpgsql,1'
tags_for_tests: '@user-password'

dump_tool:
name: Dump Tool UI tests
uses: ./.github/workflows/runner-e2e-tests-codeceptjs.yml
secrets: inherit
with:
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_ui_branch: ${{ inputs.pmm_ui_branch || 'main' }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
client_flags: '--addclient=ps,1'
tags_for_tests: '@dump'
67 changes: 67 additions & 0 deletions .github/workflows/fb-integration-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: _FB integration CLI tests

on:
workflow_dispatch:
inputs:
pmm_server_image:
description: "pmm-server docker image, default perconalab/pmm-server:dev-latest"
required: false
type: string
pmm_client_version:
description: "pmm2-client version Tarball or Dev-latest, default is dev-latest"
required: false
type: string
pmm_client_image:
description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest"
required: false
type: string
pmm_qa_branch:
description: "Branch for PMM-QA to checkout"
required: false
type: string
pmm_ui_tests_branch:
description: "Branch for PMM-UI(CLI) tests to checkout"
required: false
type: string
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

jobs:
get_versions:
name: Get versions
uses: ./.github/workflows/pmm-version-getter.yml
with:
repository: ${{ inputs.pmm_server_case || 'release candidate'}}

pmm-server-tests:
name: 'PMM Server ${{needs.get_versions.outputs.finish_version}} containers tests'
uses: ./.github/workflows/runner-integration-cli-tests.yml
secrets: inherit
needs: get_versions
with:
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
pmm_ui_tests_branch: ${{ inputs.pmm_ui_tests_branch || 'main' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
cli_test: 'pmm-server-only'

# [ps5.7, ps8, ms8.0, pdpgsql13, pdpgsql14, pdpgsql15, modb4.4, modb5, modb6, help, generic, clientContainer, haproxy, proxysql, remove]

pmm-client-container-tests:
name: 'PMM Client Docker Container tests'
uses: ./.github/workflows/runner-integration-cli-tests.yml
secrets: inherit
needs: get_versions
with:
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
pmm_ui_tests_branch: ${{ inputs.pmm_ui_tests_branch || 'main' }}
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }}
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
pmm_client_version: ${{ inputs.pmm_client_version || 'dev-latest' }}
cli_test: 'pmm-client-docker'
services_list: '--setup-pmm-client-docker'
89 changes: 89 additions & 0 deletions .github/workflows/fb-tarball-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: _FB tarball tests

on:
workflow_dispatch:
inputs:
package_testing_branch:
description: 'Target branch for package-testing repository'
type: string
default: 'master'
required: true
pmm_server_image:
description: "pmm-server docker image"
required: true
type: string
default: "perconalab/pmm-server:dev-latest"
pmm_client_tarball:
description: "PMM Client tarball link or FB-code"
default: 'dev-latest'
type: string
required: true
metrics_mode:
description: 'Select the Metrics Mode for PMM Client:'
required: true
default: 'auto'
type: choice
options:
- auto
- push
- pull
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

workflow_call:
inputs:
package_testing_branch:
description: 'Target branch for package-testing repository'
type: string
default: 'master'
required: false
pmm_server_image:
description: "pmm-server docker image"
required: true
type: string
default: "perconalab/pmm-server:dev-latest"
pmm_client_tarball:
description: "PMM Client tarball link or FB-code"
type: string
required: true
metrics_mode:
description: 'Select the Metrics Mode for PMM Client:'
default: 'auto'
type: string
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

secrets:
BACKUP_LOCATION_ACCESS_KEY:
required: false
BACKUP_LOCATION_SECRET_KEY:
required: false

jobs:
tarball_install:
name: Tarball Install test
uses: ./.github/workflows/package-test-fb.yml@main
secrets: inherit
with:
package_testing_branch: 'master'
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_tarball: ${{ inputs.pmm_client_tarball || 'dev-latest' }}
playbook: 'pmm2-client_integration_custom_port'
test_name: 'Tarball install'
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}

tarball_upgrade:
name: Tarball Upgrade test
uses: ./.github/workflows/package-test-fb.yml@main
secrets: inherit
with:
package_testing_branch: 'master'
pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
pmm_client_tarball: ${{ inputs.pmm_client_tarball || 'dev-latest' }}
playbook: 'pmm2-client_integration_upgrade_custom_path'
test_name: 'Tarball upgrade'
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ on:
# run with default inputs
workflow_dispatch:
inputs:
server_image:
pmm_server_image:
description: "pmm-server docker image, default perconalab/pmm-server:dev-latest"
required: false
type: string
@@ -29,7 +29,7 @@ on:
type: string
workflow_call:
inputs:
server_image:
pmm_server_image:
description: "pmm-server docker image, default perconalab/pmm-server:dev-latest"
required: false
type: string
@@ -59,13 +59,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 40
env:
SERVER_IMAGE: ${{ github.event.inputs.server_image || inputs.server_image || 'perconalab/pmm-server:dev-latest' }}
SERVER_IMAGE: ${{ github.event.inputs.pmm_server_image || inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
CLIENT_IMAGE: ${{ github.event.inputs.client_image || inputs.client_image || 'perconalab/pmm-client:dev-latest' }}
CLIENT_VERSION: ${{ github.event.inputs.client_version || inputs.client_version || 'dev-latest' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PMM_QA_BRANCH: ${{ github.event.inputs.pmm_qa_branch || inputs.pmm_qa_branch || 'main' }}
PMM_UI_BRANCH: ${{ github.event.inputs.pmm_ui_branch || inputs.pmm_ui_branch || 'main' }}
DOCKER_VERSION: ${{ github.event.inputs.server_image || inputs.server_image || 'perconalab/pmm-server:dev-latest' }}
DOCKER_VERSION: ${{ github.event.inputs.pmm_server_image || inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
CLIENT_DOCKER_VERSION: ${{ github.event.inputs.client_image || inputs.client_image || 'perconalab/pmm-client:dev-latest' }}
SHA: ${{ github.event.inputs.sha || inputs.sha || github.event.pull_request.head.sha || github.event.pull_request.head.sha || github.sha || 'null' }}
strategy:
@@ -211,7 +211,7 @@ jobs:
run: |
npx playwright test pmm-ui-tests/cli/tests/mongoDb-psmdb.spec.ts --quiet
# TODO: Add setup for the official MongoDB and run "npx playwright test pmm-ui-tests/cli/tests/mongoDb.spec.ts"
# TODO: Add setup for the official MongoDB and run "npx playwright test pmm-ui-tests/cli/tests/mongoDb.spec.ts"

- name: Run Client Container Setup
if: ${{ matrix.db-type == 'clientContainer' }}
9 changes: 9 additions & 0 deletions .github/workflows/package-test-fb.yml
Original file line number Diff line number Diff line change
@@ -37,6 +37,10 @@ on:
- auto
- push
- pull
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

workflow_call:
inputs:
@@ -66,6 +70,10 @@ on:
test_name:
description: 'Name of the test to pretty display in checks list'
type: string
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

jobs:
get_versions:
@@ -93,3 +101,4 @@ jobs:
playbook: ${{ inputs.playbook || 'pmm2-client_integration_custom_path' }}
test_name: ${{ inputs.test_name > '' && format('{0} {1}', inputs.test_name, matrix.os) || matrix.os }}
os: ${{ matrix.os }}
sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }}
13 changes: 5 additions & 8 deletions .github/workflows/runner-e2e-tests-codeceptjs.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: _runner-e2e-tests
on:
workflow_call:
inputs:
server_image:
pmm_server_image:
description: "pmm-server docker image, default perconalab/pmm-server:dev-latest"
required: false
type: string
@@ -42,18 +42,15 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
SERVER_IMAGE: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }}
CLIENT_IMAGE: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }}
CLIENT_VERSION: ${{ inputs.client_version || 'dev-latest' }}
PMM_CLIENT_VERSION: ${{ inputs.client_version || 'dev-latest' }}
SHA: ${{ inputs.sha || 'null' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADMIN_PASSWORD: 'admin-password'
PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }}
PMM_QA_GIT_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }}
PMM_UI_BRANCH: ${{ inputs.pmm_ui_branch || 'main' }}
DOCKER_VERSION: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }}
DOCKER_VERSION: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
CLIENT_DOCKER_VERSION: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }}
SHA: ${{ inputs.sha || 'null' }}
PMM_CLIENT_VERSION: ${{ inputs.client_version || 'dev-latest' }}
CLIENT_FLAGS: ${{ inputs.client_flags || '' }}
TAGS_FOR_TESTS: ${{ inputs.tags_for_tests || '@settings-fb' }}

@@ -115,7 +112,7 @@ jobs:

- name: Setup PMM2-Client
working-directory: ./pmm-qa
run: sudo bash -x pmm-tests/pmm2-client-setup.sh --pmm_server_ip 192.168.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no
run: sudo bash -x pmm-tests/pmm2-client-setup.sh --pmm_server_ip 192.168.0.1 --client_version ${{ env.PMM_CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no

- name: Run Setup for E2E Tests
working-directory: ./pmm-qa
8 changes: 2 additions & 6 deletions .github/workflows/runner-e2e-tests-podman.yml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ name: runner-e2e-tests-podman
on:
workflow_call:
inputs:
server_image:
pmm_server_image:
description: "pmm-server docker image, default perconalab/pmm-server:dev-latest"
required: false
type: string
@@ -34,9 +34,6 @@ on:
description: "example: @settings-fb"
required: true
type: string
push:
branches:
- PMM-12359-podman-setup

jobs:
ui-tests-e2e:
@@ -45,15 +42,14 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 60
env:
SERVER_IMAGE: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }}
CLIENT_IMAGE: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }}
CLIENT_VERSION: ${{ inputs.client_version || 'dev-latest' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADMIN_PASSWORD: 'admin-password'
PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }}
PMM_QA_GIT_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }}
PMM_UI_BRANCH: ${{ inputs.pmm_ui_branch || 'main' }}
DOCKER_VERSION: ${{ inputs.server_image || 'perconalab/pmm-server:dev-latest' }}
DOCKER_VERSION: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:dev-latest' }}
CLIENT_DOCKER_VERSION: ${{ inputs.client_image || 'perconalab/pmm-client:dev-latest' }}
SHA: ${{ inputs.sha || 'null' }}
CLIENT_FLAGS: ${{ inputs.client_flags || '' }}
148 changes: 148 additions & 0 deletions .github/workflows/runner-integration-cli-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: _runner-integration-cli-tests
on:
workflow_call:
inputs:
pmm_qa_branch:
description: "Branch for PMM-QA to checkout"
required: false
type: string
pmm_ui_tests_branch:
description: "Branch for PMM-UI(CLI) tests to checkout"
required: false
type: string
pmm_server_image:
description: 'PMM Server docker image:'
default: 'perconalab/pmm-server:dev-latest'
required: true
type: string
client_image:
description: "pmm2-client docker image, default perconalab/pmm-client:dev-latest"
required: false
type: string
pmm_client_version:
description: 'PMM Client version (dev-latest|pmm2-latest|pmm2-rc|x.xx.x|https://tarball.tar.gz)'
default: 'dev-latest'
required: true
type: string
services_list:
description: "pmm-framework.sh flags to perform setup, '--pmm2' added implicitly"
required: false
type: string
cli_test:
description: "playwright test arguments to execute tests"
required: false
type: string
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

jobs:
cli-tests:
runs-on: ubuntu-latest
timeout-minutes: 40
env:
SHA: ${{ github.event.inputs.sha || inputs.sha || github.event.pull_request.head.sha || github.event.pull_request.head.sha || github.sha || 'null' }}
PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }}
PMM_UI_TESTS_BRANCH: ${{ inputs.pmm_ui_tests_branch || 'main' }}
PMM_CLIENT_VERSION: ${{ inputs.pmm_client_version || 'dev-latest' }}
### used in tests ###
PMM_SERVER_IMAGE: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}

### used in pmm-framework.sh ###
DOCKER_VERSION: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}
CLIENT_DOCKER_VERSION: ${{ inputs.pmm_client_image || 'perconalab/pmm-client:dev-latest' }}

steps:
- name: Create status check
if: ${{ env.SHA != 'null' }}
uses: percona/gh-action-github-status-action@v1
continue-on-error: true
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: "${{ matrix.db-type }} CLI tests"
description: "Test execution ${{ job.status }}"
state: "pending"
repository: ${{ github.repository }}
target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
sha: ${{ env.SHA }}

- name: 'Checkout pmm-qa: <${{ env.PMM_QA_BRANCH }}>'
uses: actions/checkout@v4
with:
ref: ${{ env.PMM_QA_BRANCH }}
repository: percona/pmm-qa
path: ./

- name: 'Checkout pmm-ui-tests: <${{ env.PMM_UI_TESTS_BRANCH }}>'
uses: actions/checkout@v4
with:
ref: ${{ env.PMM_UI_TESTS_BRANCH }}
repository: percona/pmm-ui-tests
path: ./pmm-ui-tests

- name: Install playwright
working-directory: ./pmm-ui-tests/cli
run: |
npm ci
- name: Setup tools
run: |
sudo apt-get install -y apt-transport-https ca-certificates dirmngr ansible libaio1 libaio-dev libnuma-dev libncurses5 socat sysbench
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754
echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \
/etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y clickhouse-client
sudo curl -s https://raw.githubusercontent.com/datacharmer/dbdeployer/master/scripts/dbdeployer-install.sh | bash
wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/get_download_link.sh
chmod +x get_download_link.sh
- name: 'Setup <PMM Sever>: "${{ env.PMM_SERVER_IMAGE }}"'
run: |
docker create -v /srv --name pmm-server-data ${{ env.PMM_SERVER_IMAGE }}
docker run -d -p 80:80 -p 443:443 -p 9000:9000 --name pmm-server \
-e PERCONA_TEST_PLATFORM_ADDRESS=https://check-dev.percona.com:443
-e PERCONA_TEST_PLATFORM_PUBLIC_KEY=RWTg+ZmCCjt7O8eWeAmTLAqW+1ozUbpRSKSwNTmO+exlS5KEIPYWuYdX
--volumes-from pmm-server-data
--restart always ${{ env.PMM_SERVER_IMAGE }}
timeout 240 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://127.0.0.1/v1/readyz)" != "200" ]]; do sleep 2; done' || false
- name: 'Setup PMM Client: <${{ env.PMM_CLIENT_VERSION }}>'
run: sudo -E bash -x ./pmm-tests/pmm2-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ env.PMM_CLIENT_VERSION }} --admin_password admin --use_metrics_mode no

- name: 'Run env setup'
if: ${{ !!inputs.services_list }}
run: |
sudo -E bash -x ./pmm-tests/pmm-framework.sh ${{ inputs.services_list }} --pmm2
- name: Run Client Container Setup
if: ${{ matrix.db-type == 'clientContainer' }}
run: |
sudo -E bash -x ./pmm-tests/pmm-framework.sh --setup-pmm-client-docker --pmm2
- name: 'Run CLI tests: ${{ inputs.cli_test }}'
working-directory: ./pmm-ui-tests/cli
run: npx playwright test ${{ inputs.cli_test }} --quiet

- name: Generate and Attach the report
if: ${{ failure() && !!inputs.cli_test }}
uses: actions/upload-artifact@v3
with:
name: "report-${{ matrix.db-type }}"
path: ./pmm-ui-tests/cli/test-report

- name: Create status check
if: ${{ always() }}
uses: percona/gh-action-github-status-action@v1
continue-on-error: true
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
context: "${{ matrix.db-type }} CLI tests"
description: "Test execution ${{ job.status }}"
state: ${{ job.status }}
repository: ${{ github.repository }}
target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
sha: ${{ env.SHA }}

4 changes: 4 additions & 0 deletions .github/workflows/runner-package-test.yml
Original file line number Diff line number Diff line change
@@ -99,6 +99,10 @@ on:
required: true
default: "jammy"
type: string
sha:
description: "SHA (leave empty if running manually, default - 'null')"
required: false
type: string

jobs:
test:

0 comments on commit d9d8a1b

Please sign in to comment.