From 90dbbade9573f6742624d374401f8c1170b907d9 Mon Sep 17 00:00:00 2001 From: Lea Lobanov Date: Wed, 4 Dec 2024 13:59:23 +0400 Subject: [PATCH] Run all tx --- .github/workflows/cadence_lint.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cadence_lint.yml b/.github/workflows/cadence_lint.yml index 0e24b76..73d14fa 100644 --- a/.github/workflows/cadence_lint.yml +++ b/.github/workflows/cadence_lint.yml @@ -32,15 +32,18 @@ jobs: sleep 5 # Wait for the emulator to start flow project deploy --network=emulator # Deploy the recipe contracts indicated in flow.json - - name: Run Transaction + - name: Run All Transactions run: | - echo "Running recipe transaction with Flow emulator..." - TRANSACTION_OUTPUT=$(flow transactions send cadence/transaction.cdc --signer emulator-account) - echo "$TRANSACTION_OUTPUT" - if echo "$TRANSACTION_OUTPUT" | grep -q "Transaction Error"; then - echo "Transaction Error detected, failing the action..." - exit 1 - fi + echo "Running all transactions in the transactions folder..." + for file in ./cadence/transactions/*.cdc; do + echo "Running transaction: $file" + TRANSACTION_OUTPUT=$(flow transactions send "$file" --signer emulator-account) + echo "$TRANSACTION_OUTPUT" + if echo "$TRANSACTION_OUTPUT" | grep -q "Transaction Error"; then + echo "Transaction Error detected in $file, failing the action..." + exit 1 + fi + done - name: Run Cadence Lint run: |