Run Instrumentation Tests #96
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: Run Instrumentation Tests | |
| on: | |
| schedule: | |
| - cron: "0 6,18 * * *" # Twice daily at 6:00 and 18:00 UTC | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| tox-env: | |
| - test-aws-opentelemetry-distro-langchain | |
| - test-aws-opentelemetry-distro-crewai | |
| - test-aws-opentelemetry-distro-llama-index | |
| - test-aws-opentelemetry-distro-mcp | |
| - test-aws-opentelemetry-distro-openai-agents | |
| version: ["oldest", "latest"] | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install tox | |
| run: pip install tox==4.30.3 | |
| - name: Run ${{ matrix.tox-env }}-${{ matrix.version }} | |
| env: | |
| PIP_NO_CACHE_DIR: "1" | |
| run: | | |
| tox -r -e ${{ matrix.python-version }}-${{ matrix.tox-env }}-${{ matrix.version }} -- -v | |
| contract-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12"] | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 | |
| - name: Build Wheel and Image Files | |
| uses: ./.github/actions/artifacts_build | |
| with: | |
| image_uri_with_tag: instrumentation-tests/${{ matrix.python-version }} | |
| push_image: false | |
| load_image: true | |
| python_version: ${{ matrix.python-version }} | |
| package_name: aws-opentelemetry-distro | |
| os: ubuntu-latest | |
| platforms: linux/amd64 | |
| - name: Set up and run GenAI contract tests | |
| run: | | |
| bash scripts/set-up-contract-tests.sh | |
| pip install pytest | |
| pytest contract-tests/tests/test/amazon/gen_ai -v |