Skip to content

Commit

Permalink
Merge branch 'main' into audit-complete-authorize#4674
Browse files Browse the repository at this point in the history
  • Loading branch information
hex1c committed Nov 10, 2024
2 parents 135d297 + ce95b65 commit 1086fc1
Show file tree
Hide file tree
Showing 628 changed files with 58,805 additions and 31,604 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ crates/test_utils/tests/connectors/ @juspay/hyperswitch-connector
crates/test_utils/tests/sample_auth.toml @juspay/hyperswitch-connector
crates/connector_configs/ @juspay/hyperswitch-connector
crates/hyperswitch_connectors/ @juspay/hyperswitch-connector
crates/api_models/src/connector_enums.rs @juspay/hyperswitch-connector
crates/common_enums/src/connector_enums.rs @juspay/hyperswitch-connector
crates/router/src/configs/defaults/payment_connector_required_fields.rs @juspay/hyperswitch-connector
crates/hyperswitch_interfaces/src/configs.rs @juspay/hyperswitch-connector

crates/router/src/compatibility/ @juspay/hyperswitch-compatibility

Expand All @@ -56,6 +60,7 @@ crates/euclid @juspay/hyperswitch-routing
crates/euclid_macros @juspay/hyperswitch-routing
crates/euclid_wasm @juspay/hyperswitch-routing
crates/kgraph_utils @juspay/hyperswitch-routing
crates/pm_auth @juspay/hyperswitch-routing
crates/router/src/routes/routing.rs @juspay/hyperswitch-routing
crates/router/src/core/routing @juspay/hyperswitch-routing
crates/router/src/core/routing.rs @juspay/hyperswitch-routing
Expand Down
13 changes: 13 additions & 0 deletions .github/data/cards_info.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
card_iin,card_issuer,card_network,card_type,card_subtype,card_issuing_country,bank_code_id,bank_code,country_code,date_created,last_updated,last_updated_provider
111122,,Visa,DEBIT,,,,,,2017-06-18 10:00:39,,
400000,INTL HDQTRS-CENTER OWNED,Visa,CREDIT,,UNITEDSTATES,,,840,2015-08-04 08:50:42,2022-06-30 16:54:07,Visa
401200,VISA PRODUCTION SUPPORT CLIENT BID 1,Visa,DEBIT,CLASSIC,UNITEDSTATES,,,840,2015-07-27 12:04:10,2022-07-06 10:24:32,Visa
411111,JP Morgan,Visa,CREDIT,,INDIA,131,JP_JPM,,2015-07-22 23:36:35,2021-02-23 07:38:19,
420000,JP Morgan,Visa,CREDIT,,UNITEDSTATES,131,JP_JPM,,2016-05-12 18:37:38,2021-02-23 07:56:53,
424242,STRIPE PAYMENTS UK LIMITED,Visa,CREDIT,,UNITEDKINGDOM,,,826,2015-07-22 16:41:32,2022-12-12 13:02:19,Visa
434994,INTESA SANPAOLO S.P.A.,Visa,CREDIT,CLASSIC,ITALY,,,380,2015-12-30 17:01:46,2022-12-12 13:03:12,Visa
444409,SELECT SEVEN FEDERAL CREDIT UNION,Visa,DEBIT,CLASSIC,UNITEDSTATES,,,840,2016-05-12 18:41:09,2022-07-06 10:26:20,Visa
486871,AMERICA FIRST FEDERAL CREDIT UNION,Visa,CREDIT,BUSINESS,UNITEDSTATES,,,840,2016-05-12 18:47:21,2022-07-06 10:35:26,Visa
491761,BANKPOLSKAKASAOPIEKIS.A.(BANKPEKAOSA),Visa,CREDIT,BUSINESS,POLAND,,,,2015-09-07 12:58:50,,
510510,BANKOFHAWAII,Mastercard,CREDIT,,UNITEDSTATES,,,,2015-07-30 05:18:28,,
520474,MASTERCARD INTERNATIONAL,Visa,DEBIT,,UNITEDSTATES,,,840,2016-05-12 18:51:16,2022-12-12 15:17:33,Visa
2 changes: 1 addition & 1 deletion .github/workflows/CI-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ jobs:

- name: Run cargo clippy with v2 features enabled
shell: bash
run: just clippy_v2 -- -D warnings -Aunused -Aclippy::todo -Aclippy::diverging_sub_expression
run: just clippy_v2

- name: Run cargo check enabling only the release and v2 features
shell: bash
Expand Down
38 changes: 12 additions & 26 deletions .github/workflows/cypress-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ concurrency:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CONNECTORS: stripe
PAYMENTS_CONNECTORS: "stripe"
PAYOUTS_CONNECTORS: "wise"
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
RUN_TESTS: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}
Expand Down Expand Up @@ -68,7 +69,7 @@ jobs:
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}}
DESTINATION_FILE_NAME: "creds.json.gpg"
S3_SOURCE_FILE_NAME: "f64157fe-a8f7-43a8-a268-b17e9a8c305f.json.gpg"
S3_SOURCE_FILE_NAME: "5a3f7679-445e-4621-86c5-39bd8d26b7c5.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
Expand Down Expand Up @@ -151,9 +152,14 @@ jobs:
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
run: just migrate run --locked-schema

- name: Insert card info into the database
if: ${{ env.RUN_TESTS == 'true' }}
run: |
PGPASSWORD=db_pass psql --host=localhost --port=5432 --username=db_user --dbname=hyperswitch_db --command "\copy cards_info FROM '.github/data/cards_info.csv' DELIMITER ',' CSV HEADER;"
- name: Build project
if: ${{ env.RUN_TESTS == 'true' }}
run: cargo build --package router --bin router --jobs 4
run: cargo build --package router --bin router --jobs 3

- name: Setup Local Server
if: ${{ env.RUN_TESTS == 'true' }}
Expand Down Expand Up @@ -181,29 +187,10 @@ jobs:
if: ${{ env.RUN_TESTS == 'true' }}
env:
CYPRESS_BASEURL: "http://localhost:8080"
ROUTER__SERVER__WORKERS: 4
shell: bash -leuo pipefail {0}
run: |
cd cypress-tests
RED='\033[0;31m'
RESET='\033[0m'
failed_connectors=()
for connector in $(echo "${CONNECTORS}" | tr "," "\n"); do
echo "${connector}"
for service in "payments" "payouts"; do
if ! ROUTER__SERVER__WORKERS=4 CYPRESS_CONNECTOR="${connector}" npm run cypress:"${service}"; then
failed_connectors+=("${connector}-${service}")
fi
done
done
if [ ${#failed_connectors[@]} -gt 0 ]; then
echo -e "${RED}One or more connectors failed to run:${RESET}"
printf '%s\n' "${failed_connectors[@]}"
exit 1
fi
scripts/execute_cypress.sh --parallel 3
kill "${{ env.PID }}"
Expand All @@ -213,6 +200,5 @@ jobs:
with:
name: cypress-test-results
path: |
cypress-tests/cypress/reports/*.json
cypress-tests/cypress/reports/*.html
cypress-tests/cypress/reports/
retention-days: 1
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,9 @@ result*
node_modules/

# cypress credentials
creds.json
creds.json

/.direnv

# Nix services data
/data
4 changes: 3 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[default]
check-filename = true
extend-ignore-identifiers-re = [
"UE_[0-9]{3,4}", # Unified error codes
]

[default.extend-identifiers]
ABD = "ABD" # Aberdeenshire, UK ISO 3166-2 code
Expand Down Expand Up @@ -38,7 +41,6 @@ ws2ipdef = "ws2ipdef" # WinSock Extension
ws2tcpip = "ws2tcpip" # WinSock Extension
ZAR = "ZAR" # South African Rand currency code
JOD = "JOD" # Jordan currency code
UE_000 = "UE_000" #default unified error code


[default.extend-words]
Expand Down
Loading

0 comments on commit 1086fc1

Please sign in to comment.