-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (69 loc) · 3.33 KB
/
PMM_PDPGSQL.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
name: PMM_PDPGSQL
on:
workflow_dispatch:
inputs:
pdpgsql_version:
description: "PDPGSQL Docker hub example perconalab/percona-distribution-postgresql:16.0 latest available Image"
required: true
pmm_image:
description: "pmm_image, example: perconalab/pmm-server:dev-latest"
required: false
repo:
description: "Percona Release Repo defaults to Experiemental example: experimental"
required: false
push:
branches:
- main
pull_request:
branches:
- main
jobs:
PMM_PDPGSQL_TEST:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
PDPGSQL_VERSION: ${{ github.event.inputs.pdpgsql_version || 'perconalab/percona-distribution-postgresql:16.0' }}
PMM_IMAGE: ${{ github.event.inputs.pmm_image || 'perconalab/pmm-server:dev-latest' }}
REPO: ${{ github.event.inputs.repo || 'experimental' }}
steps:
- uses: actions/checkout@v2
- name: Concatenate values to environment file
run: |
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: 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
if: ${{ inputs.repo == 'experimental' }}
run: sudo percona-release enable-only original experimental
- name: Install Enable percona-release testing for rc installation of pmm2-client
if: ${{ inputs.repo == 'testing' }}
run: sudo percona-release enable-only original testing
- 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 for PDPGSQL tests
run: ./pmm-framework.sh --addclient=pgpgsql,1 --pdpgsql-version=16 --pmm2 --download
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: sudo npx playwright install-deps && npx codeceptjs def pr.codecept.js
working-directory: pmm-ui-tests
- name: Run the Integration tests of pdpgsql
run: npx codeceptjs run -c pr.codecept.js tests/qa-integration/pmm_pdpgsql_integration_test.js --steps --debug
working-directory: pmm-ui-tests