diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 0d2a238..0c9c01e 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -49,19 +49,8 @@ jobs: touch ./.env echo "NOVA_API=https://${{ env.PORTAL_STG_HOST }}" >> ./.env echo "NOVA_ACCESS_TOKEN=${{ env.PORTAL_STG_ACCESS_TOKEN }}" >> ./.env - # echo "NOVA_USERNAME=${{ secrets.NOVA_USERNAME }}" >> ./.env - # echo "NOVA_PASSWORD=${{ secrets.NOVA_PASSWORD }}" >> ./.env echo "CELL_NAME=cell" >> ./.env - - echo "Contents of .env:" - cat ./.env - - # Loop through all Python scripts in 'examples/' and run each - for script in examples/*.py; do - echo "Running $script..." - PYTHONPATH=. poetry run python "$script" - echo - done + source ./scripts/run_examples.sh # Always run cleanup, whether success or failure - name: Cleanup - Delete instance diff --git a/scripts/run_examples.sh b/scripts/run_examples.sh new file mode 100755 index 0000000..fe3881c --- /dev/null +++ b/scripts/run_examples.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +# Exit immediately if a command exits with a non-zero status. +set -e + +# -- Define blacklist of scripts to skip -- +BLACKLIST=("07_auth0_with_device_code.py") + +# -- Loop through all Python scripts in /examples and run them unless blacklisted -- +for script in examples/*.py; do + # Extract just the filename (e.g., '01_basic.py') + filename=$(basename "$script") + + # Check if current filename is in the blacklist + if [[ " ${BLACKLIST[@]} " =~ " ${filename} " ]]; then + echo "Skipping blacklisted script: $filename" + continue + fi + + echo "Running $filename ..." + PYTHONPATH=. poetry run python "$script" + echo +done