Update PMM_PXC_PROXYSQL.yaml (#75) #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PMM_PXC_PROXYSQL | |
on: | |
workflow_dispatch: | |
inputs: | |
pxc_version: | |
description: "pxc version, example: 8.0.33-25 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 | |
type: string | |
pxc_glibc: | |
description: "pxc glibc version, example: 2.35" | |
default: '2.35' | |
required: true | |
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 | |
type: string | |
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: | |
- v3 | |
pull_request: | |
branches: | |
- v3 | |
jobs: | |
PMM_PXC_TEST: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
env: | |
ADMIN_PASSWORD: 'admin' | |
PXC_VERSION: ${{ github.event.inputs.pxc_version || '8.0' }} | |
PXC_GLIBC: ${{ github.event.inputs.pxc_glibc || '2.35' }} | |
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: PXC_VERSION ENV Setup | |
run: | | |
if [[ "${{ github.event.inputs.pxc_version }}" != http* ]]; then | |
PXC_VERSION="${{ github.event.inputs.pxc_version }}" | |
PXC_VERSION_PATH=$(echo "pxc-$PXC_VERSION") | |
PXC_VERSION_TRIMED=$(echo ${PXC_VERSION%-*}) | |
else | |
wget https://raw.githubusercontent.com/Percona-QA/package-testing/master/VERSIONS | |
PXC_VERSION="$(grep 'PXC80_VER' VERSIONS | cut -d = -f 2)" | |
PXC_VERSION_PATH=$(echo "pxc-$PXC_VERSION.1") | |
PXC_VERSION_TRIMED=$(echo ${PXC_VERSION%-*}) | |
fi | |
echo "PXC_VERSION=${PXC_VERSION}" | sed 's/"//g' >> $GITHUB_ENV | |
echo "PXC_VERSION_TAR=${PXC_VERSION}.1" | sed 's/"//g' >> $GITHUB_ENV | |
echo "PXC_VERSION_PATH=${PXC_VERSION_PATH}" >> $GITHUB_ENV | |
echo "PXC_VERSION_TRIMED=${PXC_VERSION_TRIMED}" >> $GITHUB_ENV | |
- name: Concatenate values to environment file | |
run: | | |
echo "PXC_TARBALL_PATH=https://downloads.percona.com/downloads/TESTING/${{env.PXC_VERSION_PATH}}/Percona-XtraDB-Cluster_${{env.PXC_VERSION_TAR}}_Linux.x86_64.glibc${{env.PXC_GLIBC}}.tar.gz" >> $GITHUB_ENV | |
echo "PMM_QA_REPO_URL=https://github.com/percona/pmm-qa/" >> $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.pxc_version }}" != http* ]]; then | |
python pmm-framework.py --verbose --pmm-server-password=${{ env.ADMIN_PASSWORD }} --client-version=${{ env.PMM_CLIENT_VERSION }} --database PXC=${{ env.PXC_VERSION }} | |
else | |
python pmm-framework.py --verbose --pmm-server-password=${{ env.ADMIN_PASSWORD }} --client-version=${{ env.PMM_CLIENT_VERSION }} --database PXC,TARBALL=${{ env.PXC_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 PXC | |
run: | | |
export PMM_UI_URL="http://127.0.0.1:8081/" | |
npx codeceptjs run -c pr.codecept.js tests/qa-integration/pmm_pxc_integration_test.js --steps --debug | |
working-directory: pmm-ui-tests | |