diff --git a/.github/workflows/jenkins-dispatch.yml b/.github/workflows/jenkins-dispatch.yml deleted file mode 100644 index ffd2406a1ee4..000000000000 --- a/.github/workflows/jenkins-dispatch.yml +++ /dev/null @@ -1,86 +0,0 @@ -on: - workflow_dispatch: - inputs: - server_image: - description: "server image: repo/name:tag" - required: true - type: string - client_image: - description: "client image: repo/name:tag" - required: true - type: string - pmm_qa_branch: - description: "Branch for PMM-QA to checkout" - required: false - type: string - sha: - description: "commit sha to report status" - required: false - type: string - -jobs: - helm-tests: - runs-on: ubuntu-latest - env: - WORK_DIR: ./pmm-qa/pmm-tests - GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }} - PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ env.PMM_QA_BRANCH }} - repository: percona/pmm-qa - path: ./pmm-qa - - - name: install tools - run: | - npm install -g bats - - - name: Start minikube - run: | - minikube start - minikube addons disable storage-provisioner - - ### Install CSI drivers for snapshots - kubectl delete storageclass standard - minikube addons enable csi-hostpath-driver - minikube addons enable volumesnapshots - kubectl patch storageclass csi-hostpath-sc -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}' - kubectl wait --for=condition=Ready node --timeout=90s minikube - - - name: Run helm tests - run: | - echo $(git submodule status) - - cd $WORK_DIR - - export IMAGE_REPO=$(echo $SERVER_IMAGE | cut -d ':' -f 1) - export IMAGE_TAG=$(echo $SERVER_IMAGE | cut -d ':' -f 2) - bats --tap pmm-2-0-bats-tests/helm-test.bats - env: - SERVER_IMAGE: ${{ inputs.server_image }} - - - name: Create status check - if: ${{ always() }} - continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.repository }} - RUN_ID: ${{ github.run_id }} - SHA: ${{ inputs.sha }} - STATUS: ${{ job.status }} - run: | - if [ "${STATUS}" = "cancelled" ]; then - STATUS="error" - fi - - gh api \ - --method POST \ - -H "Accept: application/vnd.github.v3+json" \ - /repos/$REPO/statuses/$SHA \ - -f state="$STATUS" \ - -f target_url="https://github.com/$REPO/actions/runs/$RUN_ID" \ - -f description="Helm Tests status: $STATUS" \ - -f context='actions/workflows/helm-tests' diff --git a/.github/workflows/pmm-cli.yml b/.github/workflows/pmm-cli.yml deleted file mode 100644 index 6ba52fe2daa5..000000000000 --- a/.github/workflows/pmm-cli.yml +++ /dev/null @@ -1,92 +0,0 @@ -on: - workflow_dispatch: - inputs: - client_tar_url: - description: 'client tar url' - required: true - type: string - pmm_branch: - description: "percona/pmm branch to checkout" - required: false - type: string - sha: - description: 'commit sha to report status' - required: false - type: string - -jobs: - pmm-cli: - name: 'PMM binary CLI tests' - runs-on: ubuntu-20.04 - env: - CLIENT_TAR_URL: ${{ github.event.inputs.client_tar_url }} - WORK_DIR: ./pmm/cli-tests - GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }} - PMM_BRANCH: ${{ inputs.pmm_branch || 'main' }} - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ env.PMM_BRANCH }} - repository: percona/pmm - path: ./pmm - - - name: Set Client tar name env variable - run: echo "PMM_CLIENT_TAR=$(echo ${{ env.CLIENT_TAR_URL }} | grep -o '[^/]*$')" >> $GITHUB_ENV - - - name: Download client - run: | - sudo wget ${{ env.CLIENT_TAR_URL }} - - - name: Unzip client - run: | - tar -xzf ${{ env.PMM_CLIENT_TAR }} - echo "PMM_CLIENT_BASEDIR=$(ls -1td pmm-client-* 2>/dev/null | grep -v ".tar" | head -n1)" >> $GITHUB_ENV - - - name: Rename client folder - run: mv ${{ env.PMM_CLIENT_BASEDIR }} pmm-client - - - name: Check pmm version output - working-directory: pmm-client - run: | - echo "export PATH=$PATH:$PWD/bin" >> ~/.bash_profile - source ~/.bash_profile - pmm --version - - - name: Install Dependencies - working-directory: ${{ env.WORK_DIR }} - run: npm ci - - - name: Run tests - working-directory: ${{ env.WORK_DIR }} - run: | - source ~/.bash_profile - npm run test:pmm-cli - - - name: Create status check - if: ${{ github.event.inputs.sha && always() }} - continue-on-error: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - REPO: ${{ github.repository }} - RUN_ID: ${{ github.run_id }} - SHA: ${{ inputs.sha }} - STATUS: ${{ job.status }} - run: | - if [ "${STATUS}" = "cancelled" ]; then - STATUS="error" - fi - - gh api \ - --method POST \ - -H "Accept: application/vnd.github.v3+json" \ - /repos/$REPO/statuses/$SHA \ - -f state="$STATUS" \ - -f target_url="https://github.com/$REPO/actions/runs/$RUN_ID" \ - -f description="PMM binary CLI Tests $STATUS" \ - -f context='actions/workflows/pmm-cli' - - # - name: Setup tmate session on failure - # if: ${{ failure() }} - # uses: percona-platform/action-tmate@v2 diff --git a/.github/workflows/pmm-qa-fb-checks.yml b/.github/workflows/pmm-qa-fb-checks.yml new file mode 100644 index 000000000000..fe04631942c0 --- /dev/null +++ b/.github/workflows/pmm-qa-fb-checks.yml @@ -0,0 +1,103 @@ +name: "FB Tests" + +on: + workflow_dispatch: + inputs: + pmm_qa_branch: + description: "Branch for PMM-QA to checkout (pmm-qa)" + required: false + type: string + pmm_ui_tests_branch: + description: "Branch for UI tests to checkout (pmm-ui-tests)" + required: false + type: string + package_testing_branch: + description: "Branch for package tests to checkout (package-testing)" + required: false + type: string + pmm_server_image: + description: "pmm-server docker image, default perconalab/pmm-server:3-dev-latest" + required: false + type: string + pmm_client_image: + description: "pmm3-client docker image, default perconalab/pmm-server:3-dev-latest" + required: false + type: string + pmm_client_version: + description: "pmm3-client version Tarball or Dev-latest, default is dev-latest" + required: false + type: string + sha: + description: "SHA (leave empty if running manually, default - 'null')" + required: false + type: string + + workflow_call: + inputs: + pmm_qa_branch: + required: false + type: string + pmm_ui_tests_branch: + required: false + type: string + package_testing_branch: + required: false + type: string + pmm_server_image: + required: false + type: string + pmm_client_image: + required: false + type: string + pmm_client_version: + required: false + type: string + sha: + required: false + type: string + +jobs: +# Enable after helm is supported for v3 +# helm_tests: +# name: Helm +# uses: percona/pmm-qa/.github/workflows/helm-tests.yml@v3 +# secrets: inherit +# with: +# sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} +# server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:3-dev-latest' }} +# client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-server:3-dev-latest' }} +# pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'v3' }} + + integration_fb_suite: + name: CLI + uses: percona/pmm-qa/.github/workflows/fb-integration-suite.yml@v3 + secrets: inherit + with: + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + pmm_ui_tests_branch: ${{ inputs.pmm_ui_tests_branch || 'v3' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'v3' }} + pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:3-dev-latest' }} + pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-server:3-dev-latest' }} + pmm_client_version: ${{ inputs.pmm_client_version || '3-dev-latest' }} + + e2e_fb_suite: + name: E2E + uses: percona/pmm-qa/.github/workflows/fb-e2e-suite.yml@v3 + secrets: inherit + with: + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + pmm_ui_tests_branch: ${{ inputs.pmm_ui_tests_branch || 'v3' }} + pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'v3' }} + pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:3-dev-latest' }} + pmm_client_image: ${{ inputs.pmm_client_image || 'perconalab/pmm-server:3-dev-latest' }} + pmm_client_version: ${{ inputs.pmm_client_version || '3-dev-latest' }} + + tarball_fb_suite: + name: Tarball + uses: percona/pmm-qa/.github/workflows/fb-tarball-suite.yml@v3 + secrets: inherit + with: + sha: ${{ inputs.sha || github.event.pull_request.head.sha || 'null' }} + package_testing_branch: ${{ inputs.package_testing_branch || 'master' }} + pmm_server_image: ${{ inputs.pmm_server_image || 'perconalab/pmm-server:3-dev-latest' }} + pmm_client_tarball: ${{ inputs.pmm_client_version || '3-dev-latest' }} diff --git a/.github/workflows/pmm3-testsuite.yml b/.github/workflows/pmm3-testsuite.yml deleted file mode 100644 index d59b76e8c1e5..000000000000 --- a/.github/workflows/pmm3-testsuite.yml +++ /dev/null @@ -1,284 +0,0 @@ -name: pmm integration tests pipeline -on: - # run with default inputs - workflow_dispatch: - inputs: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:3-dev-latest" - required: false - type: string - client_version: - description: "pmm-client version Tarball or Dev-latest, default is 3-dev-latest" - required: false - type: string - client_image: - description: "pmm-client docker image, default perconalab/pmm-client:3-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(CLI) tests to checkout" - required: false - type: string - sha: - description: "SHA (leave empty if running manually, default - 'null')" - required: false - type: string - workflow_call: - inputs: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:3-dev-latest" - required: false - type: string - client_version: - description: "pmm-client version Tarball or Dev-latest, default is 3-dev-latest" - required: false - type: string - client_image: - description: "pmm-client docker image, default perconalab/pmm-client:3-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(CLI) tests to checkout" - 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: - SERVER_IMAGE: ${{ github.event.inputs.server_image || inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - CLIENT_IMAGE: ${{ github.event.inputs.client_image || inputs.client_image || 'perconalab/pmm-client:3-dev-latest' }} - CLIENT_VERSION: ${{ github.event.inputs.client_version || inputs.client_version || '3-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:3-dev-latest' }} - CLIENT_DOCKER_VERSION: ${{ github.event.inputs.client_image || inputs.client_image || 'perconalab/pmm-client:3-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: - fail-fast: false - matrix: - db-type: [ps5.7, ps8, ms8.0, pdpgsql13, pdpgsql14, pdpgsql15, modb4.4, modb5, modb6, help, generic, clientContainer, haproxy, proxysql, remove] - - steps: - - name: Create status check - if: ${{ env.SHA != 'null' }} - uses: percona-platform/github-status-action@update-node - 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 tests ${{ env.PMM_QA_BRANCH }} branch - uses: actions/checkout@v4 - with: - ref: ${{ env.PMM_QA_BRANCH }} - repository: percona/pmm-qa - path: ./ - - - name: Checkout PMM UI tests - uses: actions/checkout@v4 - with: - ref: ${{ env.PMM_UI_BRANCH }} - repository: percona/pmm-ui-tests - path: ./pmm-ui-tests - - - name: Install playwright - working-directory: ./pmm-ui-tests/cli - run: | - npm install - npx playwright install - - - name: Setup tools - run: | - npm install -g bats - 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 PMM3-Server - run: | - docker create -v /srv --name pmm-server-data ${{ env.SERVER_IMAGE }} - docker run -d -p 80:80 -p 443:443 -p 9000:9000 -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 --name pmm-server --restart always ${{ env.SERVER_IMAGE }} - sleep 30 - - - name: healthcheck PMM3-server - run: timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/ping)" != "200" ]]; do sleep 5; done' || false - - - name: Setup PMM3-Client - run: sudo -E bash -x ./pmm-tests/pmm-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password admin --use_metrics_mode no - - - name: Setup npm modules for the integration setup - working-directory: pmm-integration - run: npm ci - - - name: Run CLI '--help' tests - if: ${{ matrix.db-type == 'help' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test pmm-ui-tests/cli/tests/help.spec.ts - - - name: Run CLI remove tests - if: ${{ matrix.db-type == 'remove' }} - working-directory: ./pmm-ui-tests - run: npx playwright test pmm-ui-tests/cli/tests/remove.spec.ts - - - name: Run Setup for ps5.7 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'ps5.7' }} - run: | - sudo npx ts-node ./integration-setup.ts --ps-version=5.7 --ci --addclient=ps,1 - - - name: Run Setup for ps8.0 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'ps8' }} - run: | - sudo npx ts-node ./integration-setup.ts --ps-version=8 --ci --addclient=ps,1 - - - name: Run bats tests for PS - if: ${{ matrix.db-type == 'ps5.7' || matrix.db-type == 'ps8' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test pmm-ui-tests/cli/tests/perconaMySqlServer.spec.ts - - - name: Run Setup for pdpgsql 13 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'pdpgsql13' }} - run: | - sudo npx ts-node ./integration-setup.ts --ci --addclient=pdpgsql,1 --pdpgsql-version=13 - - - name: Run Setup for pdpgsql 14 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'pdpgsql14' }} - run: | - sudo npx ts-node ./integration-setup.ts --ci --addclient=pdpgsql,1 --pdpgsql-version=14 - - - name: Run Setup for pdpgsql 15.0 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'pdpgsql15' }} - run: | - sudo npx ts-node ./integration-setup.ts --ci --addclient=pdpgsql,1 --pdpgsql-version=15.0 - - - name: Run CLI tests for PDPGSQL - if: ${{ matrix.db-type == 'pdpgsql13' || matrix.db-type == 'pdpgsql14' || matrix.db-type == 'pdpgsql15' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test postgreSql - - - name: Run Setup for PSMDB 4.4 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'modb4.4' }} - run: sudo npx ts-node ./integration-setup.ts --ci --addclient=modb,1 --mo-version=4.4 - - - name: Run Setup for PSMDB 5 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'modb5' }} - run: sudo npx ts-node ./integration-setup.ts --ci --addclient=modb,1 --mo-version=5 - - - name: Run Setup for PSMDB 6 - working-directory: pmm-integration - if: ${{ matrix.db-type == 'modb6' }} - run: sudo npx ts-node ./integration-setup.ts --ci --addclient=modb,1 --mo-version=6 - - - name: Run CLI tests for PSMDB - if: ${{ matrix.db-type == 'modb6' || matrix.db-type == 'modb5' || matrix.db-type == 'modb4.4' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test pmm-ui-tests/cli/tests/mongoDb-psmdb.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' }} - run: | - sudo -E bash -x ./pmm-tests/pmm-framework.sh --setup-pmm-client-docker --pmm - - - name: Run CLI tests for Generic Scenarios - if: ${{ matrix.db-type == 'generic' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test generic unregister - - - name: Run bats tests for generic Scenarios - if: ${{ matrix.db-type == 'generic' }} - run: | - sudo bats ./pmm-tests/pmm-2-0-bats-tests/generic-tests.bats - - - name: Run CLI tests for PMM Client Docker Container - if: ${{ matrix.db-type == 'clientContainer' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test pmm-client-docker - - - name: Run Setup for HAPROXY - if: ${{ matrix.db-type == 'haproxy' }} - run: | - export CLIENT_VERSION=${{ env.CLIENT_VERSION }} - export CLIENT_DOCKER_VERSION=${{ env.CLIENT_DOCKER_VERSION }} - sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=haproxy,1 --pmm - - - name: Run CLI tests for Client Container Scenarios - if: ${{ matrix.db-type == 'haproxy' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test haproxy - - - name: Run Setup for ProxySQL - if: ${{ matrix.db-type == 'proxysql' }} - run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=pxc,1 --pmm --pxc-version=5.7 - - - name: Run CLI tests for ProxySQL - if: ${{ matrix.db-type == 'proxysql' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test proxySql - - - name: Run Setup for MySQL 8.0 - if: ${{ matrix.db-type == 'ms8.0' }} - run: sudo -E bash -x ./pmm-tests/pmm-framework.sh --addclient=ms,1 --pmm --ms-version=8.0 - - - name: Run MySQL specific CLI tests - if: ${{ matrix.db-type == 'ms8.0' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test pmm-ui-tests/cli/tests/mysql.spec.ts - - - name: Run CLI tests for MySQL Tests - if: ${{ matrix.db-type == 'ms8.0' }} - working-directory: ./pmm-ui-tests/cli - run: npx playwright test pmm-ui-tests/cli/tests/mysql-conf-file.spec.ts - - - name: Generate and Attach the report - if: ${{ always() }} - 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-platform/github-status-action@update-node - 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 }} diff --git a/.github/workflows/pmm3-ui-tests-fb.yml b/.github/workflows/pmm3-ui-tests-fb.yml deleted file mode 100644 index 5af56544f861..000000000000 --- a/.github/workflows/pmm3-ui-tests-fb.yml +++ /dev/null @@ -1,217 +0,0 @@ -name: pmm-ui-tests-fb - -on: - workflow_dispatch: - inputs: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:3-dev-latest" - required: false - type: string - client_version: - description: "pmm-client version Tarball or Dev-latest, default is 3-dev-latest" - required: false - type: string - client_image: - description: "pmm-client docker image, default perconalab/pmm-client:3-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: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:3-dev-latest" - required: false - type: string - client_version: - description: "pmm-client version Tarball URL or Dev-latest, default is 3-dev-latest" - required: false - type: string - client_image: - description: "pmm-client docker image, default perconalab/pmm-client:3-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/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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/ui-tests.yml -# secrets: inherit -# with: -# server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} -# client_version: ${{ inputs.client_version || '3-dev-latest' }} -# client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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' - - instances: - name: Instances UI tests - uses: ./.github/workflows/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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-ui-tests/.github/workflows/pmm-ui-tests.yml@main - secrets: inherit - with: - pmm_ui_tests_branch: ${{ inputs.pmm_ui_branch || 'main '}} - pmm_test_flag: '@rbac' - pmm_server_version: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - pmm_client_version: ${{ inputs.client_version || '3-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/ui-tests.yml - secrets: inherit - with: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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: - server_image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - client_version: ${{ inputs.client_version || '3-dev-latest' }} - client_image: ${{ inputs.client_image || 'perconalab/pmm-client:3-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' diff --git a/.github/workflows/trivy_scan.yml b/.github/workflows/trivy_scan.yml index 6496ad34ff87..3c023d4483da 100644 --- a/.github/workflows/trivy_scan.yml +++ b/.github/workflows/trivy_scan.yml @@ -1,47 +1,33 @@ name: Scan pmm server and client docker images on: + schedule: + - cron: '0 7 * * 1' workflow_dispatch: inputs: server_image: description: "pmm-server docker image" - required: true + required: false + default: perconalab/pmm-server:3-dev-latest type: string client_image: description: "pmm-client docker image" - required: true - type: string - sha: - description: "SHA of commit to update status on" - required: true + default: perconalab/pmm-client:3-dev-latest + required: false type: string jobs: scan: runs-on: ubuntu-latest - env: - SHA: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha }} - + strategy: fail-fast: false matrix: include: - - image: ${{ inputs.server_image }} - - image: ${{ inputs.client_image }} + - image: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} + - image: ${{ inputs.client_image || 'perconalab/pmm-client:3-dev-latest' }} steps: - - name: Communicate action status back to the PR - uses: percona-platform/github-status-action@update-node - continue-on-error: true - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ matrix.image }}" - description: "Trivy vulnerability scanning ${{ job.status }}" - state: "pending" - repository: ${{ github.repository }} - target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - sha: ${{ env.SHA }} - - name: Set report filename run: | echo "REPORT=$(echo ${{ matrix.image }} | cut -d'/' -f2 | tr ':' '-')" >> $GITHUB_ENV @@ -59,21 +45,20 @@ jobs: - name: Archive trivy scan results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.REPORT }} path: ${{ env.REPORT }} retention-days: 7 - - name: Communicate action status back to the PR - if: always() - uses: percona-platform/github-status-action@update-node - continue-on-error: true - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ matrix.image }}" - description: "Trivy vulnerability scanning ${{ job.status }}" - state: ${{ job.status }} - repository: ${{ github.repository }} - target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" - sha: ${{ env.SHA }} + - name: Send Slack notification on failure + if: ${{ failure() }} + uses: percona/gh-action-action-slack-notify@v2 + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_TOKEN }} + SLACK_USERNAME: "trivy scanner" + SLACK_ICON_EMOJI: ":squirrel:" + SLACK_COLOR: "#FF0000" + SLACK_TITLE: "CVE Scan failure" + SLACK_MESSAGE: "Failed CVE scan for ${{ matrix.image }}" + SLACK_FOOTER: "Please check the Actions URL ^" diff --git a/.github/workflows/ui-tests-podman.yml b/.github/workflows/ui-tests-podman.yml deleted file mode 100644 index 65dcc7d3e2c4..000000000000 --- a/.github/workflows/ui-tests-podman.yml +++ /dev/null @@ -1,239 +0,0 @@ -name: ui-tests-podman-pipeline -on: - workflow_call: - inputs: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:3-dev-latest" - required: false - type: string - client_version: - description: "pmm-client version Tarball or Dev-latest, default is 3-dev-latest" - required: false - type: string - client_image: - description: "pmm-client docker image, default perconalab/pmm-client:3-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 - client_flags: - description: "example: --addclient=ps,1 --ps-version=5.7" - required: false - type: string - tags_for_tests: - description: "example: @settings-fb" - required: true - type: string - push: - branches: - - PMM-12359-podman-setup - -jobs: - ui-tests-e2e: - name: "podman e2e tests: ${{ inputs.tags_for_tests || '@settings-fb' }}" -# runs-on: ubuntu-latest Mongo Replica setup fails in ubuntu-latest for some reason. Additional investigation needed - runs-on: ubuntu-20.04 - timeout-minutes: 60 - env: - SERVER_IMAGE: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - CLIENT_IMAGE: ${{ inputs.client_image || 'perconalab/pmm-client:3-dev-latest' }} - CLIENT_VERSION: ${{ inputs.client_version || '3-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:3-dev-latest' }} - CLIENT_DOCKER_VERSION: ${{ inputs.client_image || 'perconalab/pmm-client:3-dev-latest' }} - SHA: ${{ inputs.sha || 'null' }} - CLIENT_FLAGS: ${{ inputs.client_flags || '' }} - TAGS_FOR_TESTS: ${{ inputs.tags_for_tests || '@settings-fb' }} - -# Environment variables for tests - BACKUP_LOCATION_ACCESS_KEY: ${{ secrets.BACKUP_LOCATION_ACCESS_KEY }} - BACKUP_LOCATION_SECRET_KEY: ${{ secrets.BACKUP_LOCATION_SECRET_KEY }} - - - steps: - - name: Create status check - if: ${{ github.event_name != 'pull_request' }} - uses: percona-platform/github-status-action@v1 - continue-on-error: true - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ env.TAGS_FOR_TESTS }} UI 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 UI tests: ${{ env.PMM_UI_BRANCH }}" - uses: actions/checkout@v4 - with: - ref: ${{ env.PMM_UI_BRANCH }} - repository: percona/pmm-ui-tests - path: ./pmm-ui-tests - - - name: "Checkout PMM QA: ${{ env.PMM_QA_BRANCH }}" - uses: actions/checkout@v4 - with: - ref: ${{ env.PMM_QA_BRANCH }} - repository: percona/pmm-qa - path: ./pmm-qa - - - name: Setup tools - run: | - npm install -g bats - 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 - . /etc/os-release - echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee \ - /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list - curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key" | sudo apt-key add - - sudo apt-get update - sudo apt-get -y upgrade - sudo apt-get install -y - sudo apt-get install -y clickhouse-client podman - sudo curl -s https://raw.githubusercontent.com/datacharmer/dbdeployer/master/scripts/dbdeployer-install.sh | bash - ls -la - pushd ./pmm-qa - wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/get_download_link.sh - chmod +x get_download_link.sh - popd - sudo sysctl net.ipv4.ip_unprivileged_port_start=80 - - - name: Setup PMM3-Server - working-directory: ./pmm-ui-tests - run: | - mkdir -p ~/.config/systemd/user/ - cat > ~/.config/systemd/user/pmm-server.service < ~/.config/pmm-server/pmm-server.env <> $GITHUB_ENV - - - name: Setup PMM3-Client - working-directory: ./pmm-qa - run: sudo bash -x pmm-tests/pmm-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no - - - name: Run Setup for E2E Tests - working-directory: ./pmm-qa - run: sudo -E bash -x pmm-tests/pmm-framework.sh ${{ env.CLIENT_FLAGS }} --pmm - - - name: Setup npm modules for e2e tests - working-directory: ./pmm-ui-tests - run: | - npm ci - envsubst < env.list > env.generated.list - - - name: Execute e2e tests with tags ${{ env.TAGS_FOR_TESTS }} - working-directory: ./pmm-ui-tests - env: - SERVER_IP : "127.0.0.1" - PMM_UI_URL : "http://127.0.0.1/" - PMM_URL : "http://admin:${{ env.ADMIN_PASSWORD }}@${{ env.SERVER_IP }}" - run: | - sed -i 's+http://localhost/+${PMM_UI_URL}/+g' pr.codecept.js - ./node_modules/.bin/codeceptjs run -c pr.codecept.js --grep "${{ env.TAGS_FOR_TESTS }}" - - - uses: actions/github-script@v6 - if: ${{ always() }} - id: artifact_name - with: - script: | - return `artifacts_for_${process.env.TAGS_FOR_TESTS.replaceAll('|', '')}` - result-encoding: string - - - name: Create status check - if: ${{ github.event_name != 'pull_request' && always() }} - uses: percona-platform/github-status-action@v1 - continue-on-error: true - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ env.TAGS_FOR_TESTS }} UI 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 }} - -# - name: Setup tmate session on failure -# if: ${{ failure() }} -# uses: percona-platform/action-tmate@v2 diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml deleted file mode 100644 index 20be66b0c3d0..000000000000 --- a/.github/workflows/ui-tests.yml +++ /dev/null @@ -1,162 +0,0 @@ -name: ui-tests-pipeline -on: - workflow_call: - inputs: - server_image: - description: "pmm-server docker image, default perconalab/pmm-server:3-dev-latest" - required: false - type: string - client_version: - description: "pmm-client version Tarball or Dev-latest, default is 3-dev-latest" - required: false - type: string - client_image: - description: "pmm-client docker image, default perconalab/pmm-client:3-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 - client_flags: - description: "example: --addclient=ps,1 --ps-version=5.7" - required: false - type: string - tags_for_tests: - description: "example: @settings-fb" - required: true - type: string - -jobs: - ui-tests-e2e: - name: "e2e tests: ${{ inputs.tags_for_tests || '@settings-fb' }}" -# runs-on: ubuntu-latest Mongo Replica setup fails in ubuntu-latest for some reason. Additional investigation needed - runs-on: ubuntu-20.04 - timeout-minutes: 60 - env: - SERVER_IMAGE: ${{ inputs.server_image || 'perconalab/pmm-server:3-dev-latest' }} - CLIENT_IMAGE: ${{ inputs.client_image || 'perconalab/pmm-client:3-dev-latest' }} - CLIENT_VERSION: ${{ inputs.client_version || '3-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:3-dev-latest' }} - CLIENT_DOCKER_VERSION: ${{ inputs.client_image || 'perconalab/pmm-client:3-dev-latest' }} - SHA: ${{ inputs.sha || 'null' }} - CLIENT_FLAGS: ${{ inputs.client_flags || '' }} - TAGS_FOR_TESTS: ${{ inputs.tags_for_tests || '@settings-fb' }} - -# Environment variables for tests - BACKUP_LOCATION_ACCESS_KEY: ${{ secrets.BACKUP_LOCATION_ACCESS_KEY }} - BACKUP_LOCATION_SECRET_KEY: ${{ secrets.BACKUP_LOCATION_SECRET_KEY }} - - - steps: - - name: Create status check - if: ${{ github.event_name != 'pull_request' }} - uses: percona-platform/github-status-action@v1 - continue-on-error: true - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ env.TAGS_FOR_TESTS }} UI 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 UI tests - uses: actions/checkout@v4 - with: - ref: ${{ env.PMM_UI_BRANCH }} - repository: percona/pmm-ui-tests - path: ./pmm-ui-tests - - - name: Setup tools - run: | - npm install -g bats - 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 - ls -la - git clone -b ${{ env.PMM_QA_BRANCH }} https://github.com/percona/pmm-qa - ls -la - pushd pmm-qa - wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/get_download_link.sh - chmod +x get_download_link.sh - popd - - - name: Setup PMM3-Server - working-directory: ./pmm-ui-tests - run: | - PWD=$(pwd) PMM_SERVER_IMAGE=${{ env.DOCKER_VERSION }} docker-compose up -d - sleep 60 - docker exec pmm-server change-admin-password ${{ env.ADMIN_PASSWORD }} - bash -x testdata/db_setup.sh - - - name: Export path to pmm-qa repo - working-directory: ./pmm-qa - run: echo "PATH_TO_PMM_QA=$(pwd)" >> $GITHUB_ENV - - - name: Setup PMM3-Client - working-directory: ./pmm-qa - run: sudo bash -x pmm-tests/pmm-client-setup.sh --pmm_server_ip 192.168.0.1 --client_version ${{ env.CLIENT_VERSION }} --admin_password ${{ env.ADMIN_PASSWORD }} --use_metrics_mode no - - - name: Run Setup for E2E Tests - working-directory: ./pmm-qa - run: sudo -E bash -x pmm-tests/pmm-framework.sh ${{ env.CLIENT_FLAGS }} --pmm - - - name: Setup npm modules for e2e tests - working-directory: ./pmm-ui-tests - run: | - npm ci - envsubst < env.list > env.generated.list - - - name: Execute e2e tests with tags ${{ env.TAGS_FOR_TESTS }} - working-directory: ./pmm-ui-tests - env: - SERVER_IP : "192.168.0.1" - PMM_UI_URL : "http://192.168.0.1/" - PMM_URL : "http://admin:${{ env.ADMIN_PASSWORD }}@${{ env.SERVER_IP }}" - run: | - sed -i 's+http://localhost/+${PMM_UI_URL}/+g' pr.codecept.js - ./node_modules/.bin/codeceptjs run -c pr.codecept.js --grep "${{ env.TAGS_FOR_TESTS }}" - - - uses: actions/github-script@v6 - if: ${{ always() }} - id: artifact_name - with: - script: | - return `artifacts_for_${process.env.TAGS_FOR_TESTS.replaceAll('|', '')}` - result-encoding: string - - - name: Create status check - if: ${{ github.event_name != 'pull_request' && always() }} - uses: percona-platform/github-status-action@v1 - continue-on-error: true - with: - authToken: ${{ secrets.GITHUB_TOKEN }} - context: "${{ env.TAGS_FOR_TESTS }} UI 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 }} - -# - name: Setup tmate session on failure -# if: ${{ failure() }} -# uses: percona-platform/action-tmate@v2