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

refactor(CI-push): move merge_group to CI-push (#1696)

Shankar Singh C08cca881c200
diff --git a/.github/workflows/CI-pr.yml b/.github/workflows/CI-pr.yml
index 5059b1dd1b..61d4c6f7df 100644
--- a/.github/workflows/CI-pr.yml
+++ b/.github/workflows/CI-pr.yml
@@ -9,10 +9,6 @@ on:
# - "Cargo.lock"
# - "Cargo.toml"
- merge_group:
- types:
- - checks_requested
-
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@@ -109,6 +105,11 @@ jobs:
else
echo "api_models_changes_exist=true" >> $GITHUB_ENV
fi
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/cards/; then
+ echo "cards_changes_exist=false" >> $GITHUB_ENV
+ else
+ echo "cards_changes_exist=true" >> $GITHUB_ENV
+ fi
if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/common_enums/; then
echo "common_enums_changes_exist=false" >> $GITHUB_ENV
else
@@ -119,11 +120,21 @@ jobs:
else
echo "common_utils_changes_exist=true" >> $GITHUB_ENV
fi
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/diesel_models/; then
+ echo "diesel_models_changes_exist=false" >> $GITHUB_ENV
+ else
+ echo "diesel_models_changes_exist=true" >> $GITHUB_ENV
+ fi
if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/drainer/; then
echo "drainer_changes_exist=false" >> $GITHUB_ENV
else
echo "drainer_changes_exist=true" >> $GITHUB_ENV
fi
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/external_services/; then
+ echo "external_services_changes_exist=false" >> $GITHUB_ENV
+ else
+ echo "external_services_changes_exist=true" >> $GITHUB_ENV
+ fi
if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/masking/; then
echo "masking_changes_exist=false" >> $GITHUB_ENV
else
@@ -149,10 +160,10 @@ jobs:
else
echo "router_env_changes_exist=true" >> $GITHUB_ENV
fi
- if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/diesel_models/; then
- echo "diesel_models_changes_exist=false" >> $GITHUB_ENV
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/test_utils/; then
+ echo "test_utils_changes_exist=false" >> $GITHUB_ENV
else
- echo "diesel_models_changes_exist=true" >> $GITHUB_ENV
+ echo "test_utils_changes_exist=true" >> $GITHUB_ENV
fi
- name: Cargo hack api_models
@@ -160,6 +171,11 @@ jobs:
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p api_models
+ - name: Cargo hack cards
+ if: env.cards_changes_exist == 'true'
+ shell: bash
+ run: cargo hack check --each-feature --no-dev-deps -p cards
+
- name: Cargo hack common_enums
if: env.common_enums_changes_exist == 'true'
shell: bash
@@ -170,11 +186,21 @@ jobs:
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p common_utils
+ - name: Cargo hack diesel_models
+ if: env.diesel_models_changes_exist == 'true'
+ shell: bash
+ run: cargo hack check --each-feature --no-dev-deps -p diesel_models
+
- name: Cargo hack drainer
if: env.drainer_changes_exist == 'true'
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p drainer
+ - name: Cargo hack external_services
+ if: env.external_services_changes_exist == 'true'
+ shell: bash
+ run: cargo hack check --each-feature --no-dev-deps -p external_services
+
- name: Cargo hack masking
if: env.masking_changes_exist == 'true'
shell: bash
@@ -200,10 +226,10 @@ jobs:
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p router_env
- - name: Cargo hack diesel_models
- if: env.diesel_models_changes_exist == 'true'
+ - name: Cargo hack test_utils
+ if: env.test_utils_changes_exist == 'true'
shell: bash
- run: cargo hack check --each-feature --no-dev-deps -p diesel_models
+ run: cargo hack check --each-feature --no-dev-deps -p test_utils
# cargo-deny:
# name: Run cargo-deny
@@ -293,6 +319,11 @@ jobs:
else
echo "api_models_changes_exist=true" >> $GITHUB_ENV
fi
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/cards/; then
+ echo "cards_changes_exist=false" >> $GITHUB_ENV
+ else
+ echo "cards_changes_exist=true" >> $GITHUB_ENV
+ fi
if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/common_enums/; then
echo "common_enums_changes_exist=false" >> $GITHUB_ENV
else
@@ -303,11 +334,21 @@ jobs:
else
echo "common_utils_changes_exist=true" >> $GITHUB_ENV
fi
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/diesel_models/; then
+ echo "diesel_models_changes_exist=false" >> $GITHUB_ENV
+ else
+ echo "diesel_models_changes_exist=true" >> $GITHUB_ENV
+ fi
if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/drainer/; then
echo "drainer_changes_exist=false" >> $GITHUB_ENV
else
echo "drainer_changes_exist=true" >> $GITHUB_ENV
fi
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/external_services/; then
+ echo "external_services_changes_exist=false" >> $GITHUB_ENV
+ else
+ echo "external_services_changes_exist=true" >> $GITHUB_ENV
+ fi
if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/masking/; then
echo "masking_changes_exist=false" >> $GITHUB_ENV
else
@@ -333,10 +374,10 @@ jobs:
else
echo "router_env_changes_exist=true" >> $GITHUB_ENV
fi
- if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/diesel_models/; then
- echo "diesel_models_changes_exist=false" >> $GITHUB_ENV
+ if git diff --exit-code --quiet origin/$GITHUB_BASE_REF -- crates/test_utils/; then
+ echo "test_utils_changes_exist=false" >> $GITHUB_ENV
else
- echo "diesel_models_changes_exist=true" >> $GITHUB_ENV
+ echo "test_utils_changes_exist=true" >> $GITHUB_ENV
fi
- name: Cargo hack api_models
@@ -344,6 +385,11 @@ jobs:
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p api_models
+ - name: Cargo hack cards
+ if: env.cards_changes_exist == 'true'
+ shell: bash
+ run: cargo hack check --each-feature --no-dev-deps -p cards
+
- name: Cargo hack common_enums
if: env.common_enums_changes_exist == 'true'
shell: bash
@@ -354,11 +400,21 @@ jobs:
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p common_utils
+ - name: Cargo hack diesel_models
+ if: env.diesel_models_changes_exist == 'true'
+ shell: bash
+ run: cargo hack check --each-feature --no-dev-deps -p diesel_models
+
- name: Cargo hack drainer
if: env.drainer_changes_exist == 'true'
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p drainer
+ - name: Cargo hack external_services
+ if: env.external_services_changes_exist == 'true'
+ shell: bash
+ run: cargo hack check --each-feature --no-dev-deps -p external_services
+
- name: Cargo hack masking
if: env.masking_changes_exist == 'true'
shell: bash
@@ -384,10 +440,10 @@ jobs:
shell: bash
run: cargo hack check --each-feature --no-dev-deps -p router_env
- - name: Cargo hack diesel_models
- if: env.diesel_models_changes_exist == 'true'
+ - name: Cargo hack test_utils
+ if: env.test_utils_changes_exist == 'true'
shell: bash
- run: cargo hack check --each-feature --no-dev-deps -p diesel_models
+ run: cargo hack check --each-feature --no-dev-deps -p test_utils
typos:
name: Spell check
diff --git a/.github/workflows/CI-push.yml b/.github/workflows/CI-push.yml
index 0e7e93a987..e087c694c5 100644
--- a/.github/workflows/CI-push.yml
+++ b/.github/workflows/CI-push.yml
@@ -11,6 +11,10 @@ on:
# - "Cargo.lock"
# - "Cargo.toml"
+ merge_group:
+ types:
+ - checks_requested
+
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
diff --git a/crates/cards/Cargo.toml b/crates/cards/Cargo.toml
index 2afc834524..00445936e3 100644
--- a/crates/cards/Cargo.toml
+++ b/crates/cards/Cargo.toml
@@ -8,12 +8,11 @@ readme = "README.md"
license.workspace = true
[features]
-default = ["serde"]
[dependencies]
error-stack = "0.3.1"
luhn = "1.0.1"
-serde = { version = "1.0.163", features = ["derive"], optional = true }
+serde = { version = "1.0.163", features = ["derive"] }
thiserror = "1.0.40"
time = "0.3.21"