mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +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
|
RUSTUP_MAX_RETRIES: 10
|
||||||
RUST_BACKTRACE: short
|
RUST_BACKTRACE: short
|
||||||
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
|
||||||
CONNECTORS: adyen_uk, bluesnap, checkout, paypal, stripe, trustpay
|
CONNECTORS: stripe
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
runner:
|
runner:
|
||||||
@ -25,7 +25,7 @@ jobs:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
redis:
|
redis:
|
||||||
image: "${{ github.event_name != 'pull_request' && 'redis' || '' }}"
|
image: 'redis'
|
||||||
options: >-
|
options: >-
|
||||||
--health-cmd "redis-cli ping"
|
--health-cmd "redis-cli ping"
|
||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 6379:6379
|
||||||
postgres:
|
postgres:
|
||||||
image: "${{ github.event_name != 'pull_request' && 'postgres:14.5' || '' }}"
|
image: 'postgres:14.5'
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: db_user
|
POSTGRES_USER: db_user
|
||||||
POSTGRES_PASSWORD: db_pass
|
POSTGRES_PASSWORD: db_pass
|
||||||
@ -49,32 +49,27 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Ignore Tests incase of pull request
|
- name: Ignore Tests incase of pull request
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Skipped tests as the event is pull request"
|
echo "Skipped tests as the event is pull request"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
- name: Repository checkout
|
- name: Repository checkout
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Decrypt connector auth file
|
- name: Decrypt connector auth file
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
env:
|
env:
|
||||||
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
|
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./scripts/decrypt_connector_auth.sh
|
run: ./scripts/decrypt_connector_auth.sh
|
||||||
|
|
||||||
- name: Set paths in env
|
- name: Set paths in env
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
id: config_path
|
id: config_path
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "CONNECTOR_AUTH_FILE_PATH=$HOME/target/test/connector_auth.toml" >> $GITHUB_ENV
|
echo "CONNECTOR_AUTH_FILE_PATH=$HOME/target/test/connector_auth.toml" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Fetch keys
|
- name: Fetch keys
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
env:
|
env:
|
||||||
TOML_PATH: "./config/development.toml"
|
TOML_PATH: "./config/development.toml"
|
||||||
run: |
|
run: |
|
||||||
@ -82,17 +77,14 @@ jobs:
|
|||||||
echo "ADMIN_API_KEY=$LOCAL_ADMIN_API_KEY" >> $GITHUB_ENV
|
echo "ADMIN_API_KEY=$LOCAL_ADMIN_API_KEY" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Build and Cache Rust Dependencies
|
- name: Build and Cache Rust Dependencies
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: Swatinem/rust-cache@v2.4.0
|
uses: Swatinem/rust-cache@v2.4.0
|
||||||
|
|
||||||
- name: Install Diesel CLI with Postgres Support
|
- name: Install Diesel CLI with Postgres Support
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
uses: baptiste0928/cargo-install@v2.1.0
|
uses: baptiste0928/cargo-install@v2.1.0
|
||||||
with:
|
with:
|
||||||
crate: diesel_cli
|
crate: diesel_cli
|
||||||
@ -100,14 +92,12 @@ jobs:
|
|||||||
args: "--no-default-features"
|
args: "--no-default-features"
|
||||||
|
|
||||||
- name: Diesel migration run
|
- name: Diesel migration run
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
|
DATABASE_URL: postgres://db_user:db_pass@localhost:5432/hyperswitch_db
|
||||||
run: diesel migration run
|
run: diesel migration run
|
||||||
|
|
||||||
- name: Setup Local Server
|
- name: Setup Local Server
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: |
|
run: |
|
||||||
cargo run &
|
cargo run &
|
||||||
COUNT=0
|
COUNT=0
|
||||||
@ -124,7 +114,6 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
env:
|
env:
|
||||||
BASE_URL: "http://localhost:8080"
|
BASE_URL: "http://localhost:8080"
|
||||||
GATEWAY_MERCHANT_ID: ${{ secrets.STRIPE_GATEWAY_MERCHANT_ID }}
|
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