Run s3 regression tests only when detecting changes related to s3 #9784
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: AWS CodeBuild CI | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
- '.all-contributorsrc' | |
- 'docs/**' | |
permissions: | |
id-token: write | |
jobs: | |
jdk8-build: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run JDK8 build | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
timeout-minutes: 120 | |
with: | |
project-name: aws-sdk-java-v2 | |
jdk11-build: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run JDK11 build | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
timeout-minutes: 120 | |
with: | |
project-name: aws-sdk-java-v2-JDK11 | |
jdk17-build: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run JDK17 build | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
timeout-minutes: 120 | |
with: | |
project-name: aws-sdk-java-v2-JDK17 | |
jdk21-build: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run JDK21 build | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
timeout-minutes: 120 | |
with: | |
project-name: aws-java-sdk-v2-JDK21 | |
windows-jdk8-build: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run JDK8 windows build | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-JDK8-windows | |
native-image-test: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run native image test | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-native-image-test | |
sonar-cloud-build: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run sonar-cloud analysis | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
timeout-minutes: 120 | |
with: | |
project-name: aws-sdk-java-v2-sonar | |
env-vars-for-codebuild: | | |
PR, | |
BRANCH, | |
BASE | |
env: | |
PR: ${{ github.event.number }} | |
BRANCH: ${{ github.head_ref || 'master'}} | |
BASE: ${{ github.base_ref }} | |
endpoints-tests: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run endpoints test | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-endpoints-test | |
brazil-json-validation: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Validate Brazil config | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-java-sdk-v2-validate-brazil-config | |
migration-tests: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
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: 7200 | |
- name: Run migration test | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-migration-test | |
# Check if S3, HTTP client, or core modules have changed | |
check-s3-related-changes: | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
runs-on: ubuntu-latest | |
outputs: | |
has_s3_related_changes: ${{ steps.check-changes.outputs.has_s3_related_changes }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check for changes related to s3 | |
id: check-changes | |
run: | | |
git fetch origin ${{ github.base_ref }} --depth 1 | |
CHANGED_FILES=$(git diff remotes/origin/${{ github.base_ref }} --name-only) | |
if echo "$CHANGED_FILES" | grep -q -E '^core/|^services/s3/|^services-custom/s3-transfer-manager/|^http-client-spi/|^http-clients/'; then | |
echo "Detected changes in S3, HTTP client, or core modules" | |
echo "has_s3_related_changes=true" >> $GITHUB_OUTPUT | |
else | |
echo "No changes detected in S3, HTTP client, or core modules" | |
echo "has_s3_related_changes=false" >> $GITHUB_OUTPUT | |
fi | |
s3-regression-tests-download: | |
needs: check-s3-related-changes | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
runs-on: ubuntu-latest | |
env: | |
REGRESSION_TEST: DownloadStreamingRegressionTesting | |
steps: | |
- name: Skip test - no S3 related changes | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes != 'true' | |
run: | | |
echo "No S3 related changes detected. Skipping S3 regression tests for downloads." | |
exit 0 | |
- name: Configure AWS Credentials | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
aws-region: us-west-2 | |
role-duration-seconds: 7200 | |
- name: Run s3 regression tests for downloads | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-s3-regression-tests | |
env-vars-for-codebuild: REGRESSION_TEST | |
s3-regression-tests-control-plane: | |
needs: check-s3-related-changes | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
runs-on: ubuntu-latest | |
env: | |
REGRESSION_TEST: ControlPlaneOperationRegressionTesting | |
steps: | |
- name: Skip test - no S3 related changes | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes != 'true' | |
run: | | |
echo "No S3 related changes detected. Skipping S3 regression tests for control plane." | |
exit 0 | |
- name: Configure AWS Credentials | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
aws-region: us-west-2 | |
role-duration-seconds: 7200 | |
- name: Run s3 regression tests for control plane | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-s3-regression-tests | |
env-vars-for-codebuild: REGRESSION_TEST | |
s3-regression-tests-upload-sync: | |
needs: check-s3-related-changes | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
runs-on: ubuntu-latest | |
env: | |
REGRESSION_TEST: UploadSyncRegressionTesting | |
steps: | |
- name: Skip test - no S3 related changes | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes != 'true' | |
run: | | |
echo "No S3 related changes detected. Skipping S3 regression tests for upload sync." | |
exit 0 | |
- name: Configure AWS Credentials | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
aws-region: us-west-2 | |
role-duration-seconds: 7200 | |
- name: Run s3 regression tests for uploads | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-s3-regression-tests | |
env-vars-for-codebuild: REGRESSION_TEST | |
s3-regression-tests-upload-async: | |
needs: check-s3-related-changes | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
runs-on: ubuntu-latest | |
env: | |
REGRESSION_TEST: UploadAsyncRegressionTesting | |
steps: | |
- name: Skip test - no S3 related changes | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes != 'true' | |
run: | | |
echo "No S3 related changes detected. Skipping S3 regression tests for upload async." | |
exit 0 | |
- name: Configure AWS Credentials | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
aws-region: us-west-2 | |
role-duration-seconds: 7200 | |
- name: Run s3 regression tests for uploads | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-s3-regression-tests | |
env-vars-for-codebuild: REGRESSION_TEST | |
s3-regression-tests-upload-crt: | |
needs: check-s3-related-changes | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
runs-on: ubuntu-latest | |
env: | |
REGRESSION_TEST: UploadCrtRegressionTesting | |
steps: | |
- name: Skip test - no S3 related changes | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes != 'true' | |
run: | | |
echo "No S3 related changes detected. Skipping S3 regression tests for upload CRT." | |
exit 0 | |
- name: Configure AWS Credentials | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
aws-region: us-west-2 | |
role-duration-seconds: 7200 | |
- name: Run s3 regression tests for uploads | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-s3-regression-tests | |
env-vars-for-codebuild: REGRESSION_TEST | |
s3-regression-tests-upload-multi: | |
needs: check-s3-related-changes | |
if: github.repository == 'aws/aws-sdk-java-v2' | |
runs-on: ubuntu-latest | |
env: | |
REGRESSION_TEST: UploadTransferManagerRegressionTesting | |
steps: | |
- name: Skip test - no S3 related changes | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes != 'true' | |
run: | | |
echo "No S3 related changes detected. Skipping S3 regression tests for upload transfer manager." | |
exit 0 | |
- name: Configure AWS Credentials | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} | |
aws-region: us-west-2 | |
role-duration-seconds: 7200 | |
- name: Run s3 regression tests for uploads | |
if: needs.check-s3-related-changes.outputs.has_s3_related_changes == 'true' | |
uses: aws-actions/aws-codebuild-run-build@v1 | |
with: | |
project-name: aws-sdk-java-v2-s3-regression-tests | |
env-vars-for-codebuild: REGRESSION_TEST |