Skip to content

Commit

Permalink
another attempt at multiline
Browse files Browse the repository at this point in the history
  • Loading branch information
MFA-X-AI committed Jan 24, 2024
1 parent ee7ac85 commit 26001d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/run-workflow-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ jobs:
build-and-run:
runs-on: ubuntu-latest
env:
TEST_XIRCUITS: 'examples/example.xircuits examples/example2.xircuits'

TEST_XIRCUITS: |
examples/example.xircuits
examples/example2.xircuits
steps:
- name: Checkout Repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -51,8 +52,8 @@ jobs:
run: |
export PYTHONPATH="${GITHUB_WORKSPACE}:${PYTHONPATH}"
LOG_FILE="${GITHUB_WORKSPACE}/workflow_logs.txt"
# Convert space-separated list to an array
IFS=' ' read -r -a TEST_FILES <<< "$TEST_XIRCUITS"
# Read the multi-line string into an array, one line per element
IFS=$'\n' read -r -a TEST_FILES <<< "$TEST_XIRCUITS"
FAIL=0
if [ ${#TEST_FILES[@]} -eq 0 ]; then
echo "No .xircuits files specified for testing." | tee -a $LOG_FILE
Expand Down

0 comments on commit 26001d4

Please sign in to comment.