Skip to content

Commit 5b203d4

Browse files
authored
Update PR check workflow file (#5397)
Update workflow file as Github default branch controls all the workflows in other branchs now
1 parent 2466b8b commit 5b203d4

File tree

1 file changed

+60
-5
lines changed

1 file changed

+60
-5
lines changed

.github/workflows/submodule-codebuild-ci.yml renamed to .github/workflows/pr-checks.yml

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ on:
33
pull_request_target:
44
branches:
55
- "master*"
6-
paths:
7-
- 'sagemaker-train/**'
8-
- 'sagemaker-serve/**'
9-
- 'sagemaker-mlops/**'
10-
- 'sagemaker-core/**'
116

127
concurrency:
138
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref }}
@@ -50,6 +45,7 @@ jobs:
5045
detect-changes:
5146
runs-on: ubuntu-latest
5247
needs: [wait-for-approval]
48+
if: github.event.pull_request.base.ref != 'master-v2'
5349
outputs:
5450
submodules: ${{ steps.check-changes.outputs.submodules }}
5551
steps:
@@ -126,6 +122,23 @@ jobs:
126122
project-name: ${{ github.event.repository.name }}-ci-${{ matrix.submodule }}-codestyle-doc-tests
127123
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'
128124

125+
codestyle-doc-tests-v2:
126+
runs-on: ubuntu-latest
127+
needs: [wait-for-approval]
128+
if: github.event.pull_request.base.ref == 'master-v2'
129+
steps:
130+
- name: Configure AWS Credentials
131+
uses: aws-actions/configure-aws-credentials@v4
132+
with:
133+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
134+
aws-region: us-west-2
135+
role-duration-seconds: 10800
136+
- name: Run Codestyle & Doc Tests
137+
uses: aws-actions/aws-codebuild-run-build@v1
138+
with:
139+
project-name: ${{ github.event.repository.name }}-ci-codestyle-doc-tests
140+
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'
141+
129142
unit-tests:
130143
runs-on: ubuntu-latest
131144
needs: [detect-changes]
@@ -148,6 +161,31 @@ jobs:
148161
project-name: ${{ github.event.repository.name }}-ci-${{ matrix.submodule }}-unit-tests
149162
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'
150163

164+
unit-tests-v2:
165+
runs-on: ubuntu-latest
166+
needs: [wait-for-approval]
167+
if: github.event.pull_request.base.ref == 'master-v2'
168+
strategy:
169+
fail-fast: false
170+
matrix:
171+
python-version: ["py39","py310","py311","py312"]
172+
steps:
173+
- name: Configure AWS Credentials
174+
uses: aws-actions/configure-aws-credentials@v4
175+
with:
176+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
177+
aws-region: us-west-2
178+
role-duration-seconds: 10800
179+
- name: Run Unit Tests
180+
uses: aws-actions/aws-codebuild-run-build@v1
181+
with:
182+
project-name: ${{ github.event.repository.name }}-ci-unit-tests
183+
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'
184+
env-vars-for-codebuild: |
185+
PY_VERSION
186+
env:
187+
PY_VERSION: ${{ matrix.python-version }}
188+
151189
integ-tests:
152190
runs-on: ubuntu-latest
153191
needs: [detect-changes]
@@ -169,3 +207,20 @@ jobs:
169207
with:
170208
project-name: ${{ github.event.repository.name }}-ci-${{ matrix.submodule }}-integ-tests
171209
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'
210+
211+
integ-tests-v2:
212+
runs-on: ubuntu-latest
213+
needs: [wait-for-approval]
214+
if: github.event.pull_request.base.ref == 'master-v2'
215+
steps:
216+
- name: Configure AWS Credentials
217+
uses: aws-actions/configure-aws-credentials@v4
218+
with:
219+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
220+
aws-region: us-west-2
221+
role-duration-seconds: 10800
222+
- name: Run Integ Tests
223+
uses: aws-actions/aws-codebuild-run-build@v1
224+
with:
225+
project-name: ${{ github.event.repository.name }}-ci-integ-tests
226+
source-version-override: 'refs/pull/${{ github.event.pull_request.number }}/head^{${{ github.event.pull_request.head.sha }}}'

0 commit comments

Comments
 (0)