Add Contract Tests for SNS #1213
Workflow file for this run
This file contains 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 Instrumentation PR Build | |
on: | |
pull_request: | |
branches: | |
- main | |
- "release/v*" | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
- name: Build Wheel and Image Files | |
uses: ./.github/actions/artifacts_build | |
with: | |
image_uri_with_tag: pr_build/${{ matrix.python-version }} | |
push_image: false | |
load_image: true | |
python_version: ${{ matrix.python-version }} | |
package_name: aws-opentelemetry-distro | |
os: ubuntu-latest | |
- name: Set up and run contract tests with pytest | |
run: | | |
bash scripts/set-up-contract-tests.sh | |
pip install pytest | |
pytest contract-tests/tests | |
build-lambda: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
if: ${{ matrix.language == 'python' }} | |
with: | |
python-version: '3.x' | |
- name: Build sample lambda function | |
working-directory: lambda-layer/sample-apps | |
run: ./package-lambda-function.sh | |
- name: Build layers | |
working-directory: lambda-layer/src | |
run: | | |
./build-lambda-layer.sh | |
pip install tox | |
tox | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # ensures the entire test matrix is run, even if one permutation fails | |
matrix: | |
tox-environment: ["spellcheck", "lint"] | |
steps: | |
- name: Checkout Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
- name: Install libsnappy-dev | |
if: ${{ matrix.tox-environment == 'lint' }} | |
run: sudo apt-get update && sudo apt-get install -y libsnappy-dev | |
- name: Set up | |
uses: ./.github/actions/set_up | |
with: | |
python_version: 3.11 | |
package_name: aws-opentelemetry-distro | |
os: ubuntu-latest | |
run_unit_tests: false | |
- name: Run ${{ matrix.tox-environment }} with tox | |
run: tox -e ${{ matrix.tox-environment }} | |
spotless: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo @ SHA - ${{ github.sha }} | |
uses: actions/checkout@v4 | |
- name: Gradle validation | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
- name: Build with Gradle | |
run: cd performance-tests; ./gradlew spotlessCheck |