-
Notifications
You must be signed in to change notification settings - Fork 1
104 lines (85 loc) · 4.56 KB
/
PMM_PROXYSQL.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: PMM_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 by default"
required: false
pxc_glibc:
description: "pxc glibc version, example: 2.35"
required: true
pmm_image:
description: "pmm_image, example: perconalab/pmm-server:dev-latest"
required: false
proxysql_version:
required: true
description: "proxysql version, example: 2.5.5"
push:
branches:
- main
pull_request:
branches:
- main
jobs:
PMM_PXC_TEST:
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
PXC_GLIBC: ${{ github.event.inputs.pxc_glibc || '2.35' }}
PMM_IMAGE: ${{ github.event.inputs.pmm_image || 'perconalab/pmm-server:dev-latest' }}
PROXYSQL_VERSION: ${{ github.event.inputs.proxysql_version || '2.5.5' }}
steps:
- uses: actions/checkout@v2
- name: PXC_VERSION ENV Setup
run: |
if [[ -n "${{ github.event.inputs.pxc_version }}" ]]; 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
echo "PMM_QA_REPO_BRANCH=main" >> $GITHUB_ENV
echo "PROXYSQL_PACKAGE_PATH=https://downloads.percona.com/downloads/proxysql2/proxysql2-${{env.PROXYSQL_VERSION}}/binary/debian/jammy/x86_64/proxysql2_${{env.PROXYSQL_VERSION}}-1.1.jammy_amd64.deb" >> $GITHUB_ENV
- name: Install Ansible and update the node
run: sudo apt-get update -y && sudo apt-get install ansible -y
- name: Install Percona Release Package
run: wget https://repo.percona.com/apt/percona-release_latest.generic_all.deb && sudo dpkg -i percona-release_latest.generic_all.deb
- name: Install Enable percona-release experimental for dev-latest installation of pmm2-client
run: sudo percona-release enable-only original experimental
- name: Install PMM Client
run: sudo apt update -y && sudo apt-get upgrade -y && sudo apt-get install -y pmm2-client
- name: Delete if the Repo already checked out
run: sudo rm -r pmm-qa || true
- name: Clone the PMM_QA repo
run: git clone -b ${{ env.PMM_QA_REPO_BRANCH }} ${{ env.PMM_QA_REPO_URL }}
- name: Give write perimssion to the bash script
run: chmod +x ./pmm-tests/pmm-framework.sh
working-directory: pmm-qa
- name: Run the pmm container in backgrounds
run: docker run --detach --restart always -p 443:443 -p 80:80 --name pmm-server ${{ env.PMM_IMAGE }}
- name: Wait before pmm-admin config command
run: sleep 120
- name: setup pmm-admin config
run: sudo pmm-admin config --server-insecure-tls --server-url=https://admin:admin@localhost:443
- name: Run PXC package tests with ProxySQL
run: ./pmm-framework.sh --pxc-version ${{ env.PXC_VERSION }} --addclient=pxc,1 --pmm2 --pxc-tarball ${{ env.PXC_TARBALL_PATH }} --proxysql-version="${{ env.PROXYSQL_VERSION }}" --proxysql-package="${{ env.PROXYSQL_PACKAGE_PATH }}"
working-directory: pmm-qa/pmm-tests
- name: Checkout the repo and install node packages
run: git clone https://github.com/percona/pmm-ui-tests.git && cd pmm-ui-tests && npm ci
- name: Install npx dependencies
run: cd pmm-ui-tests && sudo npx playwright install-deps && npx codeceptjs def pr.codecept.js
- name: Run the Integration tests of PXC
run: npx codeceptjs run -c pr.codecept.js tests/qa-integration/pmm_pxc_integration_test.js --steps --debug
working-directory: pmm-ui-tests