Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into cypress-card-type-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif-m committed Dec 11, 2024
2 parents 9ae0c2f + 400d9a4 commit c0ef886
Show file tree
Hide file tree
Showing 854 changed files with 41,523 additions and 13,060 deletions.
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allow-dbg-in-tests = true
68 changes: 63 additions & 5 deletions .github/workflows/cypress-tests-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,76 @@ concurrency:
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
PAYMENTS_CONNECTORS: "stripe"
PAYOUTS_CONNECTORS: "wise"
PAYMENTS_CONNECTORS: "cybersource stripe"
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')}}
DEBUG: cypress:cli
RUST_MIN_STACK: 10485760

jobs:
formatter:
name: Run formatter on Cypress tests and address lints
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Generate a token
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}
private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}

- name: Checkout repository with token
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ steps.generate_token.outputs.token }}

- name: Checkout repository for fork
if: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install Cypress and dependencies
run: |
npm ci --prefix ./cypress-tests
- name: Check formatting for forked pull requests
if: ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
shell: bash
run: |
npm run format:check --prefix cypress-tests
npm run lint --prefix cypress-tests
- name: Check formatting
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
shell: bash
run: |
npm run format --prefix cypress-tests
npm run lint --prefix cypress-tests -- --fix
if ! git diff --exit-code --quiet -- cypress-tests; then
echo "::notice::Cypress formatting and lint check failed"
git config --local user.name 'hyperswitch-bot[bot]'
git config --local user.email '148525504+hyperswitch-bot[bot]@users.noreply.github.com'
git add cypress-tests
git commit --message 'chore(cypress): run formatter and address lints'
git push
fi
runner:
name: Run Cypress tests
runs-on: hyperswitch-runners
runs-on: ubuntu-latest

services:
redis:
Expand Down Expand Up @@ -69,7 +127,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: "5a3f7679-445e-4621-86c5-39bd8d26b7c5.json.gpg"
S3_SOURCE_FILE_NAME: "6f8289a9-6da0-433b-8a24-18d4d7257b7f.json.gpg"
shell: bash
run: |
mkdir -p ".github/secrets" ".github/test"
Expand Down Expand Up @@ -190,7 +248,7 @@ jobs:
ROUTER__SERVER__WORKERS: 4
shell: bash -leuo pipefail {0}
run: |
scripts/execute_cypress.sh --parallel 3
scripts/execute_cypress.sh
kill "${{ env.PID }}"
Expand Down
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ HypoNoeLbFurNiederosterreichUWien = "HypoNoeLbFurNiederosterreichUWien"
hypo_noe_lb_fur_niederosterreich_u_wien = "hypo_noe_lb_fur_niederosterreich_u_wien"
IOT = "IOT" # British Indian Ocean Territory country code
klick = "klick" # Swedish word for clicks
FPR = "FPR" # Fraud Prevention Rules
LSO = "LSO" # Lesotho country code
NAM = "NAM" # Namibia country code
ND = "ND" # North Dakota state code
Expand Down
386 changes: 386 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

Loading

0 comments on commit c0ef886

Please sign in to comment.