Sync examples from connectors (#884) #116
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python SDK cluster management integration tests | |
| permissions: {} | |
| on: | |
| workflow_call: {} | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # required by aws-actions/configure-aws-credentials | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Cache pip packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v6 | |
| with: | |
| role-to-assume: ${{ secrets.PYTHON_IAM_ROLE }} | |
| aws-region: us-east-1 | |
| - name: Configure and run integration for cluster management | |
| working-directory: ./python/cluster_management | |
| run: | | |
| python3 -m venv cm-integ | |
| source cm-integ/bin/activate | |
| pip install --upgrade pip | |
| pip install --force-reinstall -r requirements.txt | |
| python3 -c "import boto3; print(boto3.__version__)" | |
| pip install pytest pytest-cov | |
| pip list | |
| echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH | |
| pytest -v test/ | |
| cleanup: | |
| if: always() | |
| needs: test | |
| uses: ./.github/workflows/dsql-cluster-cleanup.yml | |
| with: | |
| run-id: ${{ github.run_id }} | |
| regions: us-east-1 us-east-2 | |
| secrets: | |
| AWS_IAM_ROLE: ${{ secrets.PYTHON_IAM_ROLE }} | |
| permissions: | |
| id-token: write # required by aws-actions/configure-aws-credentials |