mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 20:23:43 +08:00
ci(postman): Run only Stripe collection against PRs (#1954)
This commit is contained in:
17
.github/workflows/postman-collection-runner.yml
vendored
17
.github/workflows/postman-collection-runner.yml
vendored
@ -16,7 +16,7 @@ env:
|
||||
RUSTUP_MAX_RETRIES: 10
|
||||
RUST_BACKTRACE: short
|
||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||
CONNECTORS: adyen_uk, bluesnap, checkout, paypal, stripe, trustpay
|
||||
CONNECTORS: stripe
|
||||
|
||||
jobs:
|
||||
runner:
|
||||
@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: "${{ github.event_name != 'pull_request' && 'redis' || '' }}"
|
||||
image: 'redis'
|
||||
options: >-
|
||||
--health-cmd "redis-cli ping"
|
||||
--health-interval 10s
|
||||
@ -34,7 +34,7 @@ jobs:
|
||||
ports:
|
||||
- 6379:6379
|
||||
postgres:
|
||||
image: "${{ github.event_name != 'pull_request' && 'postgres:14.5' || '' }}"
|
||||
image: 'postgres:14.5'
|
||||
env:
|
||||
POSTGRES_USER: db_user
|
||||
POSTGRES_PASSWORD: db_pass
|
||||
@ -49,32 +49,27 @@ jobs:
|
||||
|
||||
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: Repository checkout
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Decrypt connector auth file
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
|
||||
shell: bash
|
||||
run: ./scripts/decrypt_connector_auth.sh
|
||||
|
||||
- name: Set paths in env
|
||||
if: github.event_name != 'pull_request'
|
||||
id: config_path
|
||||
shell: bash
|
||||
run: |
|
||||
echo "CONNECTOR_AUTH_FILE_PATH=$HOME/target/test/connector_auth.toml" >> $GITHUB_ENV
|
||||
|
||||
- name: Fetch keys
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
TOML_PATH: "./config/development.toml"
|
||||
run: |
|
||||
@ -82,17 +77,14 @@ jobs:
|
||||
echo "ADMIN_API_KEY=$LOCAL_ADMIN_API_KEY" >> $GITHUB_ENV
|
||||
|
||||
- name: Install Rust
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Build and Cache Rust Dependencies
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: Swatinem/rust-cache@v2.4.0
|
||||
|
||||
- name: Install Diesel CLI with Postgres Support
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: baptiste0928/cargo-install@v2.1.0
|
||||
with:
|
||||
crate: diesel_cli
|
||||
@ -100,14 +92,12 @@ jobs:
|
||||
args: "--no-default-features"
|
||||
|
||||
- name: Diesel migration run
|
||||
if: github.event_name != 'pull_request'
|
||||
shell: bash
|
||||
env:
|
||||
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
|
||||
run: diesel migration run
|
||||
|
||||
- name: Setup Local Server
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
cargo run &
|
||||
COUNT=0
|
||||
@ -124,7 +114,6 @@ jobs:
|
||||
done
|
||||
|
||||
- name: Run Tests
|
||||
if: github.event_name != 'pull_request'
|
||||
env:
|
||||
BASE_URL: "http://localhost:8080"
|
||||
GATEWAY_MERCHANT_ID: ${{ secrets.STRIPE_GATEWAY_MERCHANT_ID }}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user