Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/codebuild-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,38 @@ jobs:
outputs:
approval-env: ${{ steps.collab-check.outputs.result }}
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.MONITORING_AWS_ROLE_ARN }}
aws-region: us-west-2
- name: Collaborator Check
uses: actions/github-script@v7
id: collab-check
env:
PR_USER_LOGIN: ${{ github.event.pull_request.user.login }}
with:
github-token: ${{ secrets.COLLAB_CHECK_TOKEN }}
result-encoding: string
script: |
const user = JSON.stringify(process.env.PR_USER_LOGIN);
try {
const res = await github.rest.repos.checkCollaborator({
owner: context.repo.owner,
repo: context.repo.repo,
username: "${{ github.event.pull_request.user.login }}",
username: user,
});
console.log("Verifed ${{ github.event.pull_request.user.login }} is a repo collaborator. Auto Approving PR Checks.")
console.log("Verifed ${user} is a repo collaborator. Auto Approving PR Checks.")
return res.status == "204" ? "auto-approve" : "manual-approval"
} catch (error) {
console.log("${{ github.event.pull_request.user.login }} is not a collaborator. Requiring Manual Approval to run PR Checks.")
return "manual-approval"
if (error.message == "Bad credentials") {
console.log("Token Expired. Please update the COLLAB_CHECK_TOKEN secret. Requiring Manual Approval to run PR Checks becuase the collaborator status could not be verified.")
const { execSync } = require('child_process')
execSync('aws cloudwatch put-metric-data --namespace "GitHubActions" --metric-name "BadCredentials" --value 1')
} else {
console.log("${user} is not a collaborator. Requiring Manual Approval to run PR Checks.")
}
return "manual-approval"
}
wait-for-approval:
runs-on: ubuntu-latest
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/run-local-mode-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run Local Mode Tests

on:
workflow_dispatch:
inputs:
prNumber:
description: 'Pull Request Number'
required: true
commitSha:
description: 'Commit SHA'
required: true

concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.prNumber }}
cancel-in-progress: true

permissions:
id-token: write # This is required for requesting the JWT

jobs:
local-mode-tests:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2
role-duration-seconds: 10800
- name: Run Slow Tests
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{ github.event.repository.name }}-ci-localmode-tests
source-version-override: 'refs/pull/${{ github.event.inputs.prNumber}}/head^{${{ github.event.inputs.commitSha }}}'

35 changes: 35 additions & 0 deletions .github/workflows/run-slow-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run Slow Tests

on:
workflow_dispatch:
inputs:
prNumber:
description: 'Pull Request Number'
required: true
commitSha:
description: 'Commit SHA'
required: true

concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.prNumber }}
cancel-in-progress: true

permissions:
id-token: write # This is required for requesting the JWT

jobs:
slow-tests:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
aws-region: us-west-2
role-duration-seconds: 10800
- name: Run Slow Tests
uses: aws-actions/aws-codebuild-run-build@v1
with:
project-name: ${{ github.event.repository.name }}-ci-slow-tests
source-version-override: 'refs/pull/${{ github.event.inputs.prNumber}}/head^{${{ github.event.inputs.commitSha }}}'

1 change: 1 addition & 0 deletions tests/integ/auto_ml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def create_auto_ml_job_if_not_exist(sagemaker_session, auto_ml_job_name):
try:
sagemaker_session.describe_auto_ml_job(job_name=auto_ml_job_name)
except Exception as e: # noqa: F841
# Random Test
auto_ml = AutoML(
role=ROLE,
target_attribute_name=TARGET_ATTRIBUTE_NAME,
Expand Down
Loading