@@ -75,50 +75,50 @@ jobs:
7575 if : failure()
7676 run : exit 1
7777
78- build :
79- runs-on : ubuntu-latest
80- strategy :
81- fail-fast : false # ensures the entire test matrix is run, even if one permutation fails
82- matrix :
83- python-version : ["3.9", "3.10", "3.11", "3.12", "3.13"]
84- steps :
85- - name : Checkout Repo @ SHA - ${{ github.sha }}
86- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
87-
88- - name : Build Wheel and Image Files
89- uses : ./.github/actions/artifacts_build
90- with :
91- image_uri_with_tag : pr-build/${{ matrix.python-version }}
92- push_image : false
93- load_image : true
94- python_version : ${{ matrix.python-version }}
95- package_name : aws-opentelemetry-distro
96- os : ubuntu-latest
97-
98- - name : Set up and run contract tests with pytest
99- run : |
100- bash scripts/set-up-contract-tests.sh
101- pip install pytest
102- pytest contract-tests/tests
103-
104- build-lambda :
105- runs-on : ubuntu-latest
106- steps :
107- - name : Checkout Repo @ SHA - ${{ github.sha }}
108- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
109- - uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
110- if : ${{ matrix.language == 'python' }}
111- with :
112- python-version : ' 3.x'
113- - name : Build sample lambda function
114- working-directory : lambda-layer/sample-apps
115- run : ./package-lambda-function.sh
116- - name : Build layers
117- working-directory : lambda-layer/src
118- run : |
119- ./build-lambda-layer.sh
120- pip install tox
121- tox
78+ # build:
79+ # runs-on: ubuntu-latest
80+ # strategy:
81+ # fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
82+ # matrix:
83+ # python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
84+ # steps:
85+ # - name: Checkout Repo @ SHA - ${{ github.sha }}
86+ # uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
87+
88+ # - name: Build Wheel and Image Files
89+ # uses: ./.github/actions/artifacts_build
90+ # with:
91+ # image_uri_with_tag: pr-build/${{ matrix.python-version }}
92+ # push_image: false
93+ # load_image: true
94+ # python_version: ${{ matrix.python-version }}
95+ # package_name: aws-opentelemetry-distro
96+ # os: ubuntu-latest
97+
98+ # - name: Set up and run contract tests with pytest
99+ # run: |
100+ # bash scripts/set-up-contract-tests.sh
101+ # pip install pytest
102+ # pytest contract-tests/tests
103+
104+ # build-lambda:
105+ # runs-on: ubuntu-latest
106+ # steps:
107+ # - name: Checkout Repo @ SHA - ${{ github.sha }}
108+ # uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0
109+ # - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
110+ # if: ${{ matrix.language == 'python' }}
111+ # with:
112+ # python-version: '3.x'
113+ # - name: Build sample lambda function
114+ # working-directory: lambda-layer/sample-apps
115+ # run: ./package-lambda-function.sh
116+ # - name: Build layers
117+ # working-directory: lambda-layer/src
118+ # run: |
119+ # ./build-lambda-layer.sh
120+ # pip install tox
121+ # tox
122122
123123 lint :
124124 runs-on : ubuntu-latest
@@ -143,7 +143,12 @@ jobs:
143143 run_unit_tests : false
144144
145145 - name : Run ${{ matrix.tox-environment }} with tox
146- run : tox -e ${{ matrix.tox-environment }}
146+ run : |
147+ if [[ "${{ matrix.tox-environment }}" == "spellcheck" ]]; then
148+ echo "Intentionally failing spellcheck to test gate job"
149+ exit 1
150+ fi
151+ tox -e ${{ matrix.tox-environment }}
147152
148153 spotless :
149154 runs-on : ubuntu-latest
@@ -165,3 +170,17 @@ jobs:
165170
166171 - name : Build with Gradle
167172 run : cd performance-tests; ./gradlew spotlessCheck
173+
174+ all-pr-checks-pass :
175+ runs-on : ubuntu-latest
176+ needs : [static-code-checks, lint, spotless]
177+ if : always()
178+ steps :
179+ - name : Check all jobs succeeded
180+ run : |
181+ results='${{ toJSON(needs) }}'
182+ if echo "$results" | jq -r '.[] | .result' | grep -v success; then
183+ echo "Some jobs failed"
184+ exit 1
185+ fi
186+ echo "All checks passed!"
0 commit comments