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

ci: run cargo check on push and migrate workflows to self-hosted runners (#14819)

Hrithikeshf0e1b4a44188
diff --git a/.github/workflows/CI-pr.yml b/.github/workflows/CI-pr.yml
index 76a1dbcc4f..6cba9a8a19 100644
--- a/.github/workflows/CI-pr.yml
+++ b/.github/workflows/CI-pr.yml
@@ -23,7 +23,7 @@ env:
jobs:
formatting:
name: Check formatting
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Generate a token
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
@@ -257,7 +257,7 @@ jobs:
typos:
name: Spell check
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Checkout repository
uses: actions/checkout@v7
@@ -267,7 +267,7 @@ jobs:
typos-required:
name: Spell check specific critical directories
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Checkout repository
uses: actions/checkout@v7
diff --git a/.github/workflows/CI-push.yml b/.github/workflows/CI-push.yml
index a126a3599d..3c0003ef1b 100644
--- a/.github/workflows/CI-push.yml
+++ b/.github/workflows/CI-push.yml
@@ -37,7 +37,7 @@ env:
jobs:
formatting:
name: Check formatting
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Checkout repository
uses: actions/checkout@v7
@@ -131,15 +131,9 @@ jobs:
run: .github/scripts/install-jq.sh
- name: Run cargo check
- if: ${{ github.event_name == 'merge_group' }}
shell: bash
run: cargo check --features "release"
- - name: Cargo hack
- if: ${{ github.event_name == 'push' }}
- shell: bash
- run: just ci_hack
-
- name: Show sccache stats
if: always()
shell: bash
@@ -147,7 +141,7 @@ jobs:
# !cancelled(), not always() — cache-on-failure, but skip on cancel.
- name: Delete stale sccache cache entry
- if: ${{ !cancelled() && github.event_name == 'merge_group' }}
+ if: ${{ !cancelled() && github.event_name == 'push' }}
continue-on-error: true
shell: bash
env:
@@ -155,7 +149,7 @@ jobs:
run: gh cache delete "sccache-local-check-msrv-${{ runner.os }}-${{ runner.arch }}" --repo "${{ github.repository }}"
- name: Save sccache cache
- if: ${{ !cancelled() && github.event_name == 'merge_group' }}
+ if: ${{ !cancelled() && github.event_name == 'push' }}
uses: actions/cache/save@v6
with:
path: ${{ env.SCCACHE_DIR }}
@@ -269,7 +263,7 @@ jobs:
typos:
name: Spell check
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Checkout repository
uses: actions/checkout@v7
@@ -279,7 +273,7 @@ jobs:
typos-required:
name: Spell check specific critical directories
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Checkout repository
uses: actions/checkout@v7
diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.yml
index 4e3f39d798..1bf0bd593b 100644
--- a/.github/workflows/cypress-tests-runner.yml
+++ b/.github/workflows/cypress-tests-runner.yml
@@ -41,12 +41,15 @@ jobs:
formatter:
name: Run formatter on Cypress tests and address lints
if: ${{ github.event_name == 'pull_request' }}
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
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@v3
+ env:
+ # v3 refuses to run behind hypersage-runners' proxy without this.
+ NODE_USE_ENV_PROXY: "1"
with:
app-id: ${{ secrets.HYPERSWITCH_BOT_APP_ID }}
private-key: ${{ secrets.HYPERSWITCH_BOT_APP_PRIVATE_KEY }}
@@ -99,7 +102,7 @@ jobs:
check-cypress-prerequisites:
name: Check Cypress prerequisites
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
outputs:
run-checks: ${{ steps.check.outputs.run-checks }}
steps:
@@ -488,7 +491,7 @@ jobs:
name: Mandatory Cypress Tests — Consolidated Result
needs: [mandatory-cypress-tests]
if: ${{ !cancelled() }}
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
permissions:
pull-requests: write
steps:
@@ -768,7 +771,7 @@ jobs:
name: Prepare Mock Connectors matrix
needs: [check-cypress-prerequisites]
if: ${{ needs.check-cypress-prerequisites.outputs.run-checks == 'true' }}
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
outputs:
mock-matrix: ${{ steps.set-mock-matrix.outputs.matrix }}
steps:
@@ -1201,7 +1204,7 @@ jobs:
name: MITM Mock Cypress Tests — Consolidated Result
needs: [mitm-cassette-replay-cypress-tests]
if: ${{ !cancelled() }}
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
permissions:
pull-requests: write
steps:
diff --git a/.github/workflows/hotfix-pr-check.yml b/.github/workflows/hotfix-pr-check.yml
index b40f8afa98..6935e07364 100644
--- a/.github/workflows/hotfix-pr-check.yml
+++ b/.github/workflows/hotfix-pr-check.yml
@@ -12,7 +12,7 @@ on:
jobs:
hotfix_pr_check:
name: Verify Hotfix PR
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
env:
HOTFIX_PR_AUTHOR: ${{ github.event.pull_request.user.login }}
HOTFIX_PR_TITLE: ${{ github.event.pull_request.title }}
@@ -21,6 +21,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6
+ - name: Install jq
+ shell: bash
+ run: .github/scripts/install-jq.sh
+
- name: Get hotfix pull request body
shell: bash
env:
diff --git a/.github/workflows/migration-check.yaml b/.github/workflows/migration-check.yaml
index d3155d46b6..daedb726fa 100644
--- a/.github/workflows/migration-check.yaml
+++ b/.github/workflows/migration-check.yaml
@@ -21,7 +21,7 @@ env:
jobs:
migration_verify:
name: Verify consistency of migrations with `schema.rs` file
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/hyperswitch_db
@@ -32,7 +32,7 @@ jobs:
services:
postgres:
- image: "postgres:alpine"
+ image: "public.ecr.aws/docker/library/postgres:alpine"
env:
POSTGRES_PASSWORD: postgres
options: >-
diff --git a/.github/workflows/pr-convention-checks.yml b/.github/workflows/pr-convention-checks.yml
index 1c178253df..2d481020c4 100644
--- a/.github/workflows/pr-convention-checks.yml
+++ b/.github/workflows/pr-convention-checks.yml
@@ -29,7 +29,7 @@ env:
jobs:
pr_title_conventional_commit_check:
name: Verify PR title follows conventional commit standards
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Install Rust
@@ -58,7 +58,7 @@ jobs:
pr_linked_issues_check:
name: Verify PR contains one or more linked issues
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Skip check for merge queue
@@ -133,7 +133,7 @@ jobs:
pr_labeler:
name: Attach suitable labels to PR
if: ${{ github.event_name == 'pull_request_target' }}
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Generate GitHub app token
diff --git a/.github/workflows/pr-title-spell-check.yml b/.github/workflows/pr-title-spell-check.yml
index 2e9a67ddb2..ed18a26be2 100644
--- a/.github/workflows/pr-title-spell-check.yml
+++ b/.github/workflows/pr-title-spell-check.yml
@@ -10,7 +10,7 @@ on:
jobs:
typos:
name: Spell check PR title
- runs-on: ubuntu-latest
+ runs-on: hypersage-runners
steps:
- name: Checkout repository
uses: actions/checkout@v6
diff --git a/.github/workflows/validate-openapi-spec.yml b/.github/workflows/validate-openapi-spec.yml
index 06db2c836d..140760c447 100644
--- a/.github/workflows/validate-openapi-spec.yml
+++ b/.github/workflows/validate-openapi-spec.yml
@@ -14,7 +14,7 @@ concurrency:
jobs:
validate_json:
name: Validate generated OpenAPI spec file
- runs-on: ubuntu-latest
+ runs-on: hyperswitch-runners
steps:
- name: Generate a token
if: ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
@@ -52,12 +52,21 @@ jobs:
- name: Generate the OpenAPI spec file for V1
shell: bash
+ env:
+ CARGO_BUILD_JOBS: 5
run: cargo run -p openapi --features v1
- name: Generate the OpenAPI spec file for V2
shell: bash
+ env:
+ CARGO_BUILD_JOBS: 5
run: cargo run -p openapi --features v2
+ - name: Install Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: "24"
+
- name: Install `swagger-cli`
shell: bash
run: npm install -g @apidevtools/swagger-cli