Skip to content

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

fix(ui-test): Run UI tests only on merge-queue (#1709)

Jagancb0ca0cc2f99
diff --git a/.github/workflows/connector-ui-sanity-tests.yml b/.github/workflows/connector-ui-sanity-tests.yml
index c72e0ea8ee..d978d1093a 100644
--- a/.github/workflows/connector-ui-sanity-tests.yml
+++ b/.github/workflows/connector-ui-sanity-tests.yml
@@ -2,10 +2,8 @@ name: Connector UI Sanity Tests
on:
workflow_dispatch:
- push:
- branches:
- - main
-
+
+ pull_request:
merge_group:
types:
- checks_requested
@@ -39,7 +37,7 @@ env:
jobs:
test_connectors:
- name: Run tests on stable toolchain for connectors
+ name: Run connector UI tests
runs-on: ubuntu-latest
services:
@@ -70,35 +68,46 @@ jobs:
fail-fast: false
matrix:
connector:
- # do not use more than 8 runners, try to group less time taking connectors together
- - stripe
- - adyen_uk,shift4,worldline,multisafepay
- - airwallex,bluesnap,checkout
- - paypal,mollie,payu,trustpay_3ds
+ # do not use more than 2 runners, try to group less time taking connectors together
+ - stripe,airwallex,bluesnap,checkout,trustpay_3ds,payu
+ - adyen_uk,shift4,worldline,multisafepay,paypal,mollie
steps:
+ - name: Ignore Tests incase of pull request
+ if: github.event_name == 'pull_request'
+ shell: bash
+ run: |
+ echo "Skipped tests as the event is pull request"
+ exit 0
+
- name: Checkout repository
+ if: github.event_name != 'pull_request'
uses: actions/checkout@v3
- name: Decrypt connector auth file
+ if: github.event_name != 'pull_request'
env:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
shell: bash
run: ./scripts/decrypt_connector_auth.sh
- name: Set connector auth file path in env
+ if: github.event_name != 'pull_request'
shell: bash
run: 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'
shell: bash
run: 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'
shell: bash
run: echo "IGNORE_BROWSER_PROFILE=true" >> $GITHUB_ENV
- name: Install latest compiler
+ if: github.event_name != 'pull_request'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
@@ -106,18 +115,21 @@ jobs:
- uses: Swatinem/[email protected]
- uses: baptiste0928/[email protected]
+ if: github.event_name != 'pull_request'
with:
crate: diesel_cli
features: postgres
args: "--no-default-features"
- name: Diesel migration run
+ if: github.event_name != 'pull_request'
shell: bash
env:
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
run: diesel migration run
- name: Start server and run tests
+ if: github.event_name != 'pull_request'
env:
UI_TESTCASES_PATH: ${{ secrets.UI_TESTCASES_PATH }}
INPUT: ${{ matrix.connector }}
@@ -125,10 +137,12 @@ jobs:
run: sh .github/scripts/run_ui_tests.sh
- name: View test results
+ if: github.event_name != 'pull_request'
shell: bash
run: cat tests/test_results.log
- name: Check test results
+ if: github.event_name != 'pull_request'
shell: bash
run: |
if test "$( grep 'test result: FAILED' -r tests/test_results.log | wc -l )" -gt "0"; then
diff --git a/crates/router/tests/connectors/trustpay_3ds_ui.rs b/crates/router/tests/connectors/trustpay_3ds_ui.rs
index da929f28da..9fd8e05c9c 100644
--- a/crates/router/tests/connectors/trustpay_3ds_ui.rs
+++ b/crates/router/tests/connectors/trustpay_3ds_ui.rs
@@ -35,6 +35,7 @@ async fn should_make_trustpay_3ds_payment(web_driver: WebDriver) -> Result<(), W
#[test]
#[serial]
+#[ignore]
fn should_make_trustpay_3ds_payment_test() {
tester!(should_make_trustpay_3ds_payment);
}