Skip to content

Commit

Permalink
ci(postman): Ignore CI checks for external contributors on PR (#2004)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixincreate authored Aug 24, 2023
1 parent 97b2747 commit 9355497
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Binary file modified .github/secrets/connector_auth.toml.gpg
Binary file not shown.
9 changes: 9 additions & 0 deletions .github/workflows/postman-collection-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,46 +52,54 @@ jobs:
uses: actions/checkout@v3

- name: Decrypt connector auth file
if: ${{ ((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')}}
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') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}
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') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}
env:
TOML_PATH: "./config/development.toml"
run: |
LOCAL_ADMIN_API_KEY=$(yq '.secrets.admin_api_key' $TOML_PATH)
echo "ADMIN_API_KEY=$LOCAL_ADMIN_API_KEY" >> $GITHUB_ENV
- name: Install Rust
if: ${{ ((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')}}
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable

- name: Build and Cache Rust Dependencies
if: ${{ ((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')}}
uses: Swatinem/rust-cache@v2.4.0

- name: Install Diesel CLI with Postgres Support
if: ${{ ((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')}}
uses: baptiste0928/cargo-install@v2.1.0
with:
crate: diesel_cli
features: postgres
args: "--no-default-features"

- name: Diesel migration run
if: ${{ ((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')}}
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') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}}
run: |
cargo run &
COUNT=0
Expand All @@ -112,6 +120,7 @@ jobs:
npm install -g 'git+ssh://git@github.com:knutties/newman.git#feature/newman-dir'
- name: Run Tests
if: ${{ ((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')}}
env:
BASE_URL: "http://localhost:8080"
GATEWAY_MERCHANT_ID: ${{ secrets.STRIPE_GATEWAY_MERCHANT_ID }}
Expand Down

0 comments on commit 9355497

Please sign in to comment.