feat: add headers for destination consumption #115
Workflow file for this run
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: Integration Tests | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/integration-tests.yml' | |
| - 'src/**/*.py' | |
| - 'tests/**/*.py' | |
| - 'pyproject.toml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/integration-tests.yml' | |
| - 'src/**/*.py' | |
| - 'tests/**/*.py' | |
| - 'pyproject.toml' | |
| jobs: | |
| integration-tests: | |
| # Skip integration tests for PRs from forks (they don't have access to secrets) | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ${{ contains(github.server_url, 'github.com') && 'ubuntu-latest' || fromJSON('["self-hosted"]') }} | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Set up integration test environment | |
| run: | | |
| echo "Setting up environment variables for integration tests..." | |
| # Process GitHub secrets (all configuration stored as secrets) | |
| echo '${{ toJSON(secrets) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_")) | "\(.key)=\(.value)"' | while read line; do | |
| echo "$line" >> $GITHUB_ENV | |
| var_name=$(echo "$line" | cut -d= -f1) | |
| echo "Set secret: $var_name" | |
| done | |
| # Process GitHub variables (all configuration stored as variables) | |
| echo '${{ toJSON(vars) }}' | jq -r 'to_entries[] | select(.key | startswith("CLOUD_SDK_CFG_")) | "\(.key)=\(.value)"' | while read line; do | |
| echo "$line" >> $GITHUB_ENV | |
| var_name=$(echo "$line" | cut -d= -f1) | |
| echo "Set variable: $var_name" | |
| done | |
| echo "Environment setup complete - automatically configured all CLOUD_SDK_CFG_* environment variables and secrets" | |
| - name: Run integration tests | |
| run: uv run pytest tests/*/integration/ -v --tb=short |