Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
fix(ui-tests): Run ui-tests for each PR on approval (#1839)
Jaganf2b370f2855c
diff --git a/.github/workflows/connector-ui-sanity-tests.yml b/.github/workflows/connector-ui-sanity-tests.ymlindex 7a991437fc..9586b299d1 100644--- a/.github/workflows/connector-ui-sanity-tests.yml+++ b/.github/workflows/connector-ui-sanity-tests.yml@@ -4,6 +4,8 @@ on:workflow_dispatch:pull_request:+ pull_request_review:+ types: [submitted]merge_group:types:- checks_requested@@ -75,40 +77,40 @@ jobs:steps:- name: Ignore Tests incase of pull request- if: github.event_name == 'pull_request'+ if: github.event_name == 'pull_request' || github.event_name == 'merge_group'shell: bashrun: |echo "Skipped tests as the event is pull request"exit 0- name: Checkout repository- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'uses: actions/checkout@v3- name: Decrypt connector auth file- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'env:CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}shell: bashrun: ./scripts/decrypt_connector_auth.sh- name: Set connector auth file path in env- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'shell: bashrun: echo "CONNECTOR_AUTH_FILE_PATH=$HOME/target/test/connector_auth.toml" >> $GITHUB_ENV- name: Set connector tests file path in env- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'shell: bashrun: echo "CONNECTOR_TESTS_FILE_PATH=$HOME/target/test/connector_tests.json" >> $GITHUB_ENV- name: Set ignore_browser_profile usage in env- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'shell: bashrun: echo "IGNORE_BROWSER_PROFILE=true" >> $GITHUB_ENV- name: Install latest compiler- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'uses: actions-rs/toolchain@v1with:toolchain: stable@@ -116,21 +118,21 @@ jobs:- uses: Swatinem/[email protected]- uses: baptiste0928/[email protected]- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'with:crate: diesel_clifeatures: postgresargs: "--no-default-features"- name: Diesel migration run- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'shell: bashenv:DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_dbrun: diesel migration run- name: Start server and run tests- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'env:UI_TESTCASES_PATH: ${{ secrets.UI_TESTCASES_PATH }}INPUT: ${{ matrix.connector }}@@ -138,12 +140,12 @@ jobs:run: sh .github/scripts/run_ui_tests.sh- name: View test results- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'shell: bashrun: cat tests/test_results.log- name: Check test results- if: github.event_name != 'pull_request'+ if: github.event_name == 'pull_request_review' &&github.event.review.state == 'approved'shell: bashrun: |if test "$( grep 'test result: FAILED' -r tests/test_results.log | wc -l )" -gt "0"; then