mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
fix(ui-test): Run UI tests only on merge-queue (#1709)
This commit is contained in:
34
.github/workflows/connector-ui-sanity-tests.yml
vendored
34
.github/workflows/connector-ui-sanity-tests.yml
vendored
@ -2,10 +2,8 @@ name: Connector UI Sanity Tests
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
|
||||||
branches:
|
pull_request:
|
||||||
- main
|
|
||||||
|
|
||||||
merge_group:
|
merge_group:
|
||||||
types:
|
types:
|
||||||
- checks_requested
|
- checks_requested
|
||||||
@ -39,7 +37,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test_connectors:
|
test_connectors:
|
||||||
name: Run tests on stable toolchain for connectors
|
name: Run connector UI tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@ -70,35 +68,46 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
connector:
|
connector:
|
||||||
# do not use more than 8 runners, try to group less time taking connectors together
|
# do not use more than 2 runners, try to group less time taking connectors together
|
||||||
- stripe
|
- stripe,airwallex,bluesnap,checkout,trustpay_3ds,payu
|
||||||
- adyen_uk,shift4,worldline,multisafepay
|
- adyen_uk,shift4,worldline,multisafepay,paypal,mollie
|
||||||
- airwallex,bluesnap,checkout
|
|
||||||
- paypal,mollie,payu,trustpay_3ds
|
|
||||||
|
|
||||||
steps:
|
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
|
- name: Checkout repository
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Decrypt connector auth file
|
- name: Decrypt connector auth file
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
env:
|
env:
|
||||||
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
|
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./scripts/decrypt_connector_auth.sh
|
run: ./scripts/decrypt_connector_auth.sh
|
||||||
|
|
||||||
- name: Set connector auth file path in env
|
- name: Set connector auth file path in env
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "CONNECTOR_AUTH_FILE_PATH=$HOME/target/test/connector_auth.toml" >> $GITHUB_ENV
|
run: echo "CONNECTOR_AUTH_FILE_PATH=$HOME/target/test/connector_auth.toml" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set connector tests file path in env
|
- name: Set connector tests file path in env
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "CONNECTOR_TESTS_FILE_PATH=$HOME/target/test/connector_tests.json" >> $GITHUB_ENV
|
run: echo "CONNECTOR_TESTS_FILE_PATH=$HOME/target/test/connector_tests.json" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set ignore_browser_profile usage in env
|
- name: Set ignore_browser_profile usage in env
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "IGNORE_BROWSER_PROFILE=true" >> $GITHUB_ENV
|
run: echo "IGNORE_BROWSER_PROFILE=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install latest compiler
|
- name: Install latest compiler
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
@ -106,18 +115,21 @@ jobs:
|
|||||||
- uses: Swatinem/rust-cache@v2.4.0
|
- uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
|
||||||
- uses: baptiste0928/cargo-install@v2.1.0
|
- uses: baptiste0928/cargo-install@v2.1.0
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
with:
|
with:
|
||||||
crate: diesel_cli
|
crate: diesel_cli
|
||||||
features: postgres
|
features: postgres
|
||||||
args: "--no-default-features"
|
args: "--no-default-features"
|
||||||
|
|
||||||
- name: Diesel migration run
|
- name: Diesel migration run
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
|
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
|
||||||
run: diesel migration run
|
run: diesel migration run
|
||||||
|
|
||||||
- name: Start server and run tests
|
- name: Start server and run tests
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
env:
|
env:
|
||||||
UI_TESTCASES_PATH: ${{ secrets.UI_TESTCASES_PATH }}
|
UI_TESTCASES_PATH: ${{ secrets.UI_TESTCASES_PATH }}
|
||||||
INPUT: ${{ matrix.connector }}
|
INPUT: ${{ matrix.connector }}
|
||||||
@ -125,10 +137,12 @@ jobs:
|
|||||||
run: sh .github/scripts/run_ui_tests.sh
|
run: sh .github/scripts/run_ui_tests.sh
|
||||||
|
|
||||||
- name: View test results
|
- name: View test results
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: cat tests/test_results.log
|
run: cat tests/test_results.log
|
||||||
|
|
||||||
- name: Check test results
|
- name: Check test results
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if test "$( grep 'test result: FAILED' -r tests/test_results.log | wc -l )" -gt "0"; then
|
if test "$( grep 'test result: FAILED' -r tests/test_results.log | wc -l )" -gt "0"; then
|
||||||
|
|||||||
@ -35,6 +35,7 @@ async fn should_make_trustpay_3ds_payment(web_driver: WebDriver) -> Result<(), W
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[serial]
|
#[serial]
|
||||||
|
#[ignore]
|
||||||
fn should_make_trustpay_3ds_payment_test() {
|
fn should_make_trustpay_3ds_payment_test() {
|
||||||
tester!(should_make_trustpay_3ds_payment);
|
tester!(should_make_trustpay_3ds_payment);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user