Skip to content

Commit be0366f

Browse files
committed
one check
1 parent f36a8ce commit be0366f

File tree

2 files changed

+78
-45
lines changed

2 files changed

+78
-45
lines changed

.github/workflows/codeql.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,17 @@ jobs:
9595
uses: github/codeql-action/analyze@16df4fbc19aea13d921737861d6c622bf3cefe23 #v2.23.0
9696
with:
9797
category: "/language:${{matrix.language}}"
98+
99+
all-codeql-checks-pass:
100+
runs-on: ubuntu-latest
101+
needs: [analyze]
102+
if: always()
103+
steps:
104+
- name: Check all jobs succeeded
105+
run: |
106+
results='${{ toJSON(needs) }}'
107+
if echo "$results" | jq -r '.[] | .result' | grep -v success; then
108+
echo "Some jobs failed"
109+
exit 1
110+
fi
111+
echo "All CodeQL checks passed!"

.github/workflows/pr-build.yml

Lines changed: 64 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)