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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
ci(cypress): refactor label-based trigger of cypress-tests (#11076)
AdityaWNL74a40fdf3abf
diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.ymlindex 14bc9d83ef..977d803907 100644--- a/.github/workflows/cypress-tests-runner.yml+++ b/.github/workflows/cypress-tests-runner.yml@@ -33,6 +33,36 @@ env:RUST_MIN_STACK: 11534336jobs:+ resolve-s-test-ready:+ name: Resolve S-test-ready label+ runs-on: ubuntu-latest+ outputs:+ s_test_ready: ${{ steps.check-s-test-ready.outputs.s_test_ready || steps.set-s-test-ready-for-skipped-tests.outputs.s_test_ready }}+ steps:+ - name: Check S-test-ready label+ id: check-s-test-ready+ if: ${{ env.RUN_TESTS == 'true' }}+ env:+ GH_TOKEN: ${{ github.token }}+ shell: bash+ run: |+ if gh pr view ${{ github.event.pull_request.number }} \+ --repo ${{ github.repository }} \+ --json labels \+ --jq '.labels[].name' | grep --quiet '^S-test-ready$'; then+ echo "S-test-ready label found"+ echo "s_test_ready=true" >> "$GITHUB_OUTPUT"+ else+ echo "::error::S-test-ready label is missing. Add the label and re-run jobs to execute Cypress tests."+ exit 1+ fi++ - name: Set S-test-ready output for skipped tests+ id: set-s-test-ready-for-skipped-tests+ if: ${{ env.RUN_TESTS == 'false' }}+ shell: bash+ run: echo "s_test_ready=false" >> "$GITHUB_OUTPUT"+formatter:name: Run formatter on Cypress tests and address lintsif: ${{ github.event_name == 'pull_request' }}@@ -94,10 +124,9 @@ jobs:build-hyperswitch:name: Build hyperswitch server- if: |- github.event_name == 'merge_group' ||- (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'S-test-ready'))+ needs: resolve-s-test-readyruns-on: ubuntu-latest+env:# Use `sccache` for caching compilation artifactsRUSTC_WRAPPER: sccache@@ -152,9 +181,7 @@ jobs:build-hyperswitch-runners:name: Build hyperswitch server(hyperswitch-runners)- if: |- github.event_name == 'merge_group' ||- (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'S-test-ready'))+ needs: resolve-s-test-readyruns-on: hyperswitch-runnersenv:# Use `sccache` for caching compilation artifacts@@ -210,10 +237,7 @@ jobs:runner:name: Run mandatory Cypress tests- needs: build-hyperswitch- if: |- github.event_name == 'merge_group' ||- (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'S-test-ready'))+ needs: [resolve-s-test-ready, build-hyperswitch]permissions:pull-requests: writeruns-on: ubuntu-latest@@ -410,10 +434,7 @@ jobs:runner-hyperswitch-runners:name: Run mandatory Cypress tests (hyperswitch-runners)- needs: build-hyperswitch-runners- if: |- github.event_name == 'merge_group' ||- (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'S-test-ready'))+ needs: [resolve-s-test-ready, build-hyperswitch-runners]permissions:pull-requests: writeruns-on: hyperswitch-runners@@ -880,9 +901,8 @@ jobs:runner_alpha:name: Run optional Cypress tests for alpha connectors- needs: build-hyperswitch-runners- if: |- github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'S-test-ready')+ if: ${{ github.event_name == 'pull_request' && needs.resolve-s-test-ready.outputs.s_test_ready == 'true' }}+ needs: [resolve-s-test-ready, build-hyperswitch-runners]runs-on: hyperswitch-runnersenv:# Use `sccache` for caching compilation artifacts@@ -1088,7 +1108,8 @@ jobs:runner_v2:name: Run Cypress tests on v2 and generate coverage report- if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'S-test-ready')+ if: ${{ github.event_name == 'pull_request' && needs.resolve-s-test-ready.outputs.s_test_ready == 'true' }}+ needs: resolve-s-test-readyruns-on: hyperswitch-runnerspermissions:pull-requests: write