Skip to content

PMM_PS

PMM_PS #174

Workflow file for this run

name: PMM_PS
on:
workflow_dispatch:
inputs:
ps_version:
description: "ps version example: 8.0.34-26 , Fetched from https://github.com/Percona-QA/package-testing/blob/master/VERSIONS"
default: 'https://github.com/Percona-QA/package-testing/blob/master/VERSIONS'
required: true
ps_glibc:
description: "ps glibc version, example: 2.28"
default: '2.28'
required: false
pmm_qa_branch:
description: "Branch for qa-integration to checkout"
required: false
type: string
pmm_ui_tests_branch:
description: "Branch for PMM-UI tests to checkout"
required: false
type: string
pmm_server_image:
description: "pmm_image, example: perconalab/pmm-server:3-dev-latest"
default: 'perconalab/pmm-server:3-dev-latest'
required: false
pmm_client_version:
description: 'PMM Client version (3-dev-latest|pmm3-rc|x.xx.x|https...)'
default: '3-dev-latest'
required: false
type: string
push:
branches:
- main
pull_request:
branches:
- main
jobs:
PMM_PS_TEST:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
ADMIN_PASSWORD: 'admin'
PS_VERSION: ${{ github.event.inputs.ps_version || '8.0' }}
PS_GLIBC: ${{ github.event.inputs.ps_glibc || '2.28' }}
PMM_SERVER_IMAGE: ${{ github.event.inputs.pmm_server_image || 'perconalab/pmm-server:3-dev-latest' }}
PMM_QA_BRANCH: ${{ github.event.inputs.pmm_qa_branch || 'v3' }}
PMM_UI_BRANCH: ${{ github.event.inputs.pmm_ui_tests_branch || 'v3' }}
PMM_CLIENT_VERSION: ${{ github.event.inputs.pmm_client_version || '3-dev-latest' }}
steps:
- uses: actions/checkout@v2
- name: PS_VERSION ENV Setup
run: |
if [[ "${{ github.event.inputs.ps_version }}" != http* ]]; then
PS_VERSION="${{ github.event.inputs.ps_version }}"
PS_VERSION_PATH=$(echo "ps-$PS_VERSION")
PS_VERSION_TRIMED=$(echo ${PS_VERSION%-*})
else
wget https://raw.githubusercontent.com/Percona-QA/package-testing/master/VERSIONS
PS_VERSION="$(grep 'PS80_VER' VERSIONS | cut -d = -f 2)"
PS_VERSION_PATH=$(echo "ps-$PS_VERSION")
PS_VERSION_TRIMED=$(echo ${PS_VERSION_FULL%-*})
fi
echo "PS_VERSION=${PS_VERSION}" | sed 's/"//g' >> $GITHUB_ENV
echo "PS_VERSION_PATH=${PS_VERSION_PATH}" >> $GITHUB_ENV
echo "PS_VERSION_TRIMED=${PS_VERSION_TRIMED}" >> $GITHUB_ENV
- name: Concatenate values to environment file
run: |
echo "PS_TARBALL_PATH=https://downloads.percona.com/downloads/TESTING/${{env.PS_VERSION_PATH}}/Percona-Server-${{env.PS_VERSION}}-Linux.x86_64.glibc${{env.PS_GLIBC}}.tar.gz" >> $GITHUB_ENV
echo "PMM_QA_REPO_URL=https://github.com/percona/pmm-qa/" >> $GITHUB_ENV
echo "PMM_QA_REPO_BRANCH=main" >> $GITHUB_ENV
- name: Install Ansible and update the node
run: sudo apt-get update -y && sudo apt-get install ansible -y
- name: Run the PMM Server container
run: docker run --detach --restart always -p 443:8443 -p 8081:8080 --name pmm-server ${{ env.PMM_SERVER_IMAGE }}
- name: Checkout qa-integration repo
uses: actions/checkout@v4
with:
ref: ${{ env.PMM_QA_BRANCH }}
repository: Percona-Lab/qa-integration
path: ./qa-integration
- name: Export path to qa-integration repo
working-directory: qa-integration
run: echo "PATH_TO_PMM_QA=$(pwd)" >> $GITHUB_ENV
- name: Run Setup for E2E Tests
working-directory: qa-integration/pmm_qa
run: |
mkdir -m 777 -p /tmp/backup_data
python3 -m venv virtenv
. virtenv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
if [[ "${{ github.event.inputs.ps_version }}" != http* ]]; then
python pmm-framework.py --pmm-server-password=${{ env.ADMIN_PASSWORD }} --verbose --database PS=${{ env.PS_VERSION }}
else
python pmm-framework.py --pmm-server-password=${{ env.ADMIN_PASSWORD }} --verbose --database PS,TARBALL=${{ env.PS_TARBALL_PATH }}
fi
- 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 npx dependencies
run: npm ci && npx playwright install --with-deps && npx codeceptjs def pr.codecept.js
working-directory: pmm-ui-tests
- name: Run the Integration tests of PS
run: |
export PMM_UI_URL="http://127.0.0.1:8081/"
npx codeceptjs run -c pr.codecept.js tests/qa-integration/pmm_ps_integration_test.js --steps --debug
working-directory: pmm-ui-tests