-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix pipelines triggers * Fixes the pipeline * correct versions in upgrade * fix server version * check versions * check * revert changes * Fix trigger for the pipeline * Delete pmm-portal-tests.yml * Delete pmm-portal-upgrade-tests.yml * PMM-7 fixed outdated changes * PMM-7 fixed outdated changes * PMM-7 added portal upgrade * PMM-7 added portal upgrade * PMM-7 fixed conditionals and matrix flow * PMM-7 removed sha error * PMM-7 syntax fix * PMM-7 fixed empty sha error * PMM-7 fixed conflicts * PMM-7 disabled portal upgrade * PMM-7 removed reties and trace * PMM-7 add eslint and format files, update codeowners * PMM-7 update libs * PMM-7 update libs * PMM-7 update libs * PMM-7 update libs * PMM-7 fixed eslint plugins * PMM-7 fixed eslint plugins * PMM-7 linter fixes * PMM-7 Added base portal refactoring * PMM-7 Added matrix for test * PMM-7 Added matrix for test * PMM-7 fixed versions for matrix * PMM-7 fixed versions for matrix * PMM-7 fixed versions for matrix * PMM-7 fixed syntax * PMM-7 added tests * PMM-7 fixed more tests * PMM-7 fixed syntax * PMM-7 fixed syntax * PMM-7 removed retries * PMM-7 annotations push clean up * PMM-7 fixed jobs vars * PMM-7 fixed jobs vars * PMM-7 fixed jobs vars * PMM-7 fixed skip * PMM-7 fixed skip 2 * PMM-7 fixed skip 2 * PMM-7 skipping SSO tests * PMM-7 skipping file * PMM-7 refactored portal errors * PMM-7 adjusted test pipelines * PMM-7 adjusted test pipelines * PMM-7 adjusted test pipelines * PMM-7 added portal setup * PMM-7 huge file names refactoring * PMM-7 added fixtures * PMM-7 debug clean up * PMM-7 added auth method * PMM-7 styling fixes * PMM-7 fixed file name --------- Co-authored-by: Peter <[email protected]> Co-authored-by: yurkovychv <[email protected]> Co-authored-by: Vasyl Yurkovych <[email protected]>
- Loading branch information
1 parent
66709d8
commit f81b576
Showing
176 changed files
with
8,272 additions
and
9,208 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: "Portal Tests Matrix" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "PMM-7-fix-portal-pipeline" | ||
|
||
jobs: | ||
get_versions: | ||
name: Get versions | ||
uses: ./.github/workflows/pmm-version-getter.yml | ||
with: | ||
repository: ${{ inputs.repository || 'dev-latest'}} | ||
matrix_range: 5 | ||
|
||
portal: | ||
name: 'Portal / Integration' | ||
uses: ./.github/workflows/portal-ui-tests.yml | ||
secrets: inherit | ||
needs: get_versions | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
old_version: ${{ fromJSON(needs.get_versions.outputs.version_matrix) }} | ||
with: | ||
pmm_ui_tests_branch: ${{ inputs.pmm_ui_tests_branch || 'main' }} | ||
pmm_test_flag: '@portal' | ||
pmm_server_version: ${{ matrix.old_version }} | ||
pmm_client_version: ${{ matrix.old_version }} | ||
pmm_qa_branch: ${{ inputs.pmm_qa_branch || 'main' }} | ||
pmm_clients: '' | ||
version_string_from: ${{needs.get_versions.outputs.start_version}} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
--- | ||
name: portal-ui-tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
pmm_ui_tests_branch: | ||
description: 'Target branch for pmm-ui-tests repository' | ||
type: string | ||
default: 'main' | ||
pmm_test_flag: | ||
description: 'Flag to run only specific portion of the tests.' | ||
type: string | ||
pmm_server_version: | ||
description: 'Version of the pmm server used for testing' | ||
type: string | ||
default: 'dev-latest' | ||
required: true | ||
pmm_client_version: | ||
description: 'Version of the pmm client used for testing' | ||
type: string | ||
default: 'dev-latest' | ||
required: true | ||
pmm_clients: | ||
description: 'Clients for pmm-server' | ||
type: string | ||
default: '--addclient=ps,1' | ||
pmm_qa_branch: | ||
description: 'Branch for the pmm-qa repository.' | ||
type: string | ||
default: 'main' | ||
version_string_from: | ||
description: 'start version string' | ||
type: string | ||
|
||
push: | ||
branches: | ||
- "PMM-7-fix-portal-pipeline" | ||
|
||
jobs: | ||
tests: | ||
name: ${{ inputs.version_string_from || inputs.pmm_server_version || 'dev-latest' }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
env: | ||
SHA: ${{ inputs.sha || 'null' }} | ||
PMM_BASE_URL: https://127.0.0.1 | ||
ADMIN_PASSWORD: admin | ||
|
||
UI_TESTS_BRANCH: "PMM-7-fix-portal-pipeline" | ||
PMM_CLIENTS: ${{ inputs.pmm_clients || '' }} | ||
PMM_TEST_FLAG: ${{ inputs.pmm_test_flag || '@portal' }} | ||
|
||
PMM_SERVER_VERSION: ${{ inputs.pmm_server_version || 'dev-latest' }} | ||
PMM_CLIENT_VERSION: ${{ inputs.pmm_client_version || 'dev-latest' }} | ||
PMM_QA_BRANCH: ${{ inputs.pmm_qa_branch || 'main' }} | ||
|
||
OKTA_TOKEN: ${{ secrets.OKTA_TOKEN }} | ||
OAUTH_ISSUER_URL: 'https://id-dev.percona.com/oauth2/aus15pi5rjdtfrcH51d7' | ||
OAUTH_CLIENT_ID: ${{ secrets.OKTA_OAUTH_CLIENT_ID }} | ||
OAUTH_CLIENT_SECRET: ${{ secrets.OKTA_OAUTH_CLIENT_SECRET }} | ||
OAUTH_PMM_CLIENT_ID: ${{ secrets.OKTA_OAUTH_PMM_CLIENT_ID }} | ||
OAUTH_PMM_CLIENT_SECRET: ${{ secrets.OKTA_OAUTH_PMM_CLIENT_SECRET }} | ||
OAUTH_DEV_HOST: ${{ secrets.OAUTH_DEV_HOST }} | ||
OAUTH_SCOPES: percona | ||
|
||
# Variables for E2E tests | ||
MAILOSAUR_API_KEY: ${{ secrets.MAILOSAUR_API_KEY }} | ||
MAILOSAUR_UI_TESTS_SERVER_ID: ${{ secrets.MAILOSAUR_UI_TESTS_SERVER_ID }} | ||
MAILOSAUR_API_TESTS_SERVER_ID: ${{ secrets.MAILOSAUR_API_TESTS_SERVER_ID }} | ||
|
||
SERVICENOW_LOGIN: percona_platform | ||
SERVICENOW_PASSWORD: ${{ secrets.SERVICENOW_PASSWORD }} | ||
SERVICENOW_DEV_URL: 'https://perconadev.service-now.com/api/x_pellc_percona_pl/platform/settest' | ||
|
||
steps: | ||
- name: PMM server version ${{ env.PMM_SERVER_VERSION }} and UI tests for flag "${{ env.PMM_TEST_FLAG }}" and pmm-ui-tests branch ${{ env.UI_TESTS_BRANCH }} | ||
if: ${{ env.SHA != 'null' }} | ||
uses: percona/gh-action-Sibz-github-status-action@v1 | ||
continue-on-error: true | ||
with: | ||
authToken: ${{ secrets.GITHUB_TOKEN }} | ||
context: "${{ env.PMM_TEST_FLAG }} 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 UI tests: "${{ env.UI_TESTS_BRANCH }}"' | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.UI_TESTS_BRANCH }} | ||
repository: percona/pmm-ui-tests | ||
path: ./pmm-ui-tests | ||
|
||
- name: 'Install playwright' | ||
working-directory: ./pmm-ui-tests/playwright-tests | ||
run: | | ||
npm ci | ||
npx playwright install | ||
- name: 'Checkout pmm-qa: "${{ env.PMM_QA_BRANCH }}"' | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: percona/pmm-qa | ||
ref: ${{ env.PMM_QA_BRANCH }} | ||
path: ./pmm-qa | ||
|
||
- name: 'Setup <PMM Sever>: "${{ env.PMM_SERVER_VERSION }}"' | ||
working-directory: pmm-qa/pmm-integration | ||
run: | | ||
npm install | ||
sudo npx ts-node ./integration-setup.ts --ci --setup-docker-pmm-server --rbac --pmm-server-docker-tag=${{ format('perconalab/pmm-server:{0}', env.PMM_SERVER_VERSION) }} --pmm-client-version=${{ env.PMM_CLIENT_VERSION }} | ||
timeout 100 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/ping)" != "200" ]]; do sleep 5; done' || false | ||
- name: 'Setup <PMM Client: ${{ inputs.pmm_client_version }}>' | ||
run: | | ||
sudo bash ./pmm-qa/pmm-tests/pmm2-client-setup.sh --pmm_server_ip 127.0.0.1 --client_version ${{ env.PMM_CLIENT_VERSION }} --admin_password admin --use_metrics_mode no | ||
shell: bash | ||
|
||
- name: Setup Databases for the PMM-Server | ||
working-directory: pmm-qa/pmm-integration | ||
run: | | ||
sudo npx ts-node ./integration-setup.ts --ci \ | ||
${{ env.PMM_CLIENTS }} | ||
sleep 30 | ||
sudo pmm-admin list | ||
shell: bash | ||
|
||
- name: 'Run UI tests: ${{ env.PMM_TEST_FLAG }}' | ||
if: ${{ inputs.pmm_test_flag != 'null' }} | ||
id: ui-tests-flagged | ||
working-directory: pmm-ui-tests/playwright-tests | ||
run: | | ||
npx playwright test --config="playwright.config.ts" --grep="${{ env.PMM_TEST_FLAG }}" | ||
# env: | ||
# NODE_TLS_REJECT_UNAUTHORIZED: 0 | ||
|
||
- name: 'Create report name' | ||
if: failure() | ||
run: | | ||
# TODO: add job id for matrix call | ||
job_tag=$(echo "${{ env.PMM_TEST_FLAG }}" | sed -e "s/-pre-upgrade//" -e "s/@//") | ||
report_name=${{ env.PMM_SERVER_VERSION }}"$job_tag"-report | ||
echo $report_name | ||
echo "REPORT_NAME=$report_name" >> $GITHUB_ENV | ||
- name: Generate and Attach the report | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.REPORT_NAME }} | ||
path: ./pmm-ui-tests/playwright-tests/playwright-report | ||
|
||
- name: Create status check | ||
uses: percona/gh-action-Sibz-github-status-action@v1 | ||
if: ${{ env.SHA != 'null' && always() }} | ||
continue-on-error: true | ||
with: | ||
authToken: ${{ secrets.GITHUB_TOKEN }} | ||
context: "${{ env.PMM_TEST_FLAG }} 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 }} |
Oops, something went wrong.