-
Notifications
You must be signed in to change notification settings - Fork 16
93 lines (79 loc) · 2.65 KB
/
pr_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Python Instrumentation PR Build
on:
pull_request:
branches:
- main
- "release/v*"
push:
branches:
- perf
env:
AWS_DEFAULT_REGION: us-east-1
TEST_TAG: 637423224110.dkr.ecr.us-east-1.amazonaws.com/eks/observability/adot-autoinstrumentation-python:test
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 Contrib Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
- name: Build Wheel and Image Files
uses: ./.github/actions/artifacts_build
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
image_uri_with_tag: ${{ env.TEST_TAG }}
image_registry: 637423224110.dkr.ecr.us-east-1.amazonaws.com
snapshot-ecr-role: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
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
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 Contrib 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 Contrib 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