Skip to content

Commit

Permalink
added blacklist & run example script
Browse files Browse the repository at this point in the history
  • Loading branch information
cbiering committed Jan 21, 2025
1 parent 20e6134 commit e051081
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
13 changes: 1 addition & 12 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions scripts/run_examples.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e051081

Please sign in to comment.