Skip to content

Commit

Permalink
Merge branch 'main' into day/normal-payloads-checksums
Browse files Browse the repository at this point in the history
  • Loading branch information
dayaffe authored Jan 26, 2024
2 parents 9980249 + f9be5af commit 951c1b4
Show file tree
Hide file tree
Showing 173 changed files with 21,202 additions and 1,034 deletions.
159 changes: 159 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: Integration Tests

on:
pull_request:
workflow_dispatch:

env:
AWS_SWIFT_SDK_USE_LOCAL_DEPS: 1

permissions:
id-token: write

jobs:
apple:
runs-on: ${{ matrix.runner }}
environment: Integration-Test
env:
DEVELOPER_DIR: /Applications/${{ matrix.xcode }}.app/Contents/Developer
strategy:
fail-fast: false
matrix:
# This matrix runs tests on Mac, on oldest & newest supported Xcodes
runner:
- macos-12
- macos-13
xcode:
- Xcode_14.0.1
- Xcode_15.2
exclude:
# Don't run old macOS with new Xcode
- runner: macos-12
xcode: Xcode_15.2
# Don't run new macOS with old Xcode
- runner: macos-13
xcode: Xcode_14.0.1
steps:
- name: Configure AWS Credentials for Integration Tests
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.INTEGRATION_TEST_ROLE_ARN }}
aws-region: us-west-2
- name: Checkout aws-sdk-swift
uses: actions/checkout@v3
- name: Select smithy-swift branch
run: |
ORIGINAL_REPO_HEAD_REF="$GITHUB_HEAD_REF" \
DEPENDENCY_REPO_URL="https://github.com/smithy-lang/smithy-swift.git" \
./scripts/ci_steps/select_dependency_branch.sh
- name: Checkout smithy-swift
uses: actions/checkout@v3
with:
repository: smithy-lang/smithy-swift
ref: ${{ env.DEPENDENCY_REPO_SHA }}
path: smithy-swift
- name: Move smithy-swift into place
run: mv smithy-swift ..
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: 1-${{ runner.os }}-gradle-${{ hashFiles('settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
1-${{ runner.os }}-gradle-${{ hashFiles('settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
1-${{ runner.os }}-gradle-
- name: Cache Swift
uses: actions/cache@v3
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/.cache/org.swift.swiftpm
key: 1-${{ runner.os }}-${{ matrix.xcode }}-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }}
restore-keys: |
1-${{ runner.os }}-${{ matrix.xcode }}-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }}
1-${{ runner.os }}-${{ matrix.xcode }}-
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
- name: Tools Versions
run: ./scripts/ci_steps/log_tool_versions.sh
- name: Prepare Integration Tests
run: ./scripts/ci_steps/prepare_integration_tests.sh
- name: Build Integration Tests
run: swift build --build-tests
- name: Run Integration Tests
run: swift test

linux:
runs-on: ubuntu-latest
environment: Integration-Test
container: swift:${{ matrix.version }}-${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- focal
#- amazonlinux2
version:
- 5.7
- 5.9
steps:
- name: Configure AWS Credentials for Integration Tests
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.INTEGRATION_TEST_ROLE_ARN }}
aws-region: us-west-2
- name: Checkout aws-sdk-swift
uses: actions/checkout@v3
- name: Select smithy-swift branch
run: |
ORIGINAL_REPO_HEAD_REF="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME:-main}}" \
DEPENDENCY_REPO_URL="https://github.com/smithy-lang/smithy-swift.git" \
./scripts/ci_steps/select_dependency_branch.sh
- name: Checkout smithy-swift
uses: actions/checkout@v3
with:
repository: smithy-lang/smithy-swift
ref: ${{ env.DEPENDENCY_REPO_SHA }}
path: smithy-swift
- name: Move smithy-swift into place
run: mv smithy-swift ..
- name: Cache Gradle
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: 1-${{ runner.os }}-gradle-${{ hashFiles('settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
1-${{ runner.os }}-gradle-${{ hashFiles('settings.gradle.kts', 'gradle/wrapper/gradle-wrapper.properties') }}
1-${{ runner.os }}-gradle-
- name: Cache Swift
uses: actions/cache@v3
with:
path: |
~/Library/Caches/org.swift.swiftpm
~/.cache/org.swift.swiftpm
key: 1-${{ runner.os }}-swift-${{ matrix.version }}-spm-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }}
restore-keys: |
1-${{ runner.os }}-swift-${{ matrix.version }}-spm-${{ hashFiles('Package.swift', 'AWSSDKSwiftCLI/Package.swift') }}
1-${{ runner.os }}-swift-${{ matrix.version }}-spm-
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: corretto
java-version: 17
- name: Install OpenSSL (all OS) and which (AL2 only)
run: ./scripts/ci_steps/install_native_linux_dependencies.sh
- name: Tools Versions
run: ./scripts/ci_steps/log_tool_versions.sh
- name: Prepare Integration Tests
run: ./scripts/ci_steps/prepare_integration_tests.sh
- name: Build Integration Tests
run: swift build --build-tests
- name: Run Integration Tests
run: swift test
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class ECSCredentialsProviderTests: XCTestCase {
)
}

func test_ecsCredentialsProvider() async throws {
// TODO: Re-enable this test once CI is configured to run it. See https://github.com/awslabs/aws-sdk-swift/issues/1310
func xtest_ecsCredentialsProvider() async throws {
let ecsClient = try await ECSClient()

// create cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class ProcessCredentialProviderTests: XCTestCase {
}

// This test calls listBuckets() and forces S3Client to use ProcessCredentialsProvider
func test_listBuckets() async throws {
// TODO: Re-enable this test once CI is configured to run it. See https://github.com/awslabs/aws-sdk-swift/issues/1309
func xtest_listBuckets() async throws {
_ = try await client.listBuckets(input: ListBucketsInput())
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// SPDX-License-Identifier: Apache-2.0
//

#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
import XCTest
import AWSS3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// SPDX-License-Identifier: Apache-2.0
//

#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
import XCTest
import AWSS3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ class SSOCredentialsProviderTests : XCTestCase {
}

// The test calls listBuckets() and forces S3Client to use SSOCredentialsProvider
func test_listBuckets() async throws {
// TODO: Re-enable this test once CI is configured to run it. See https://github.com/awslabs/aws-sdk-swift/issues/1311
func xtest_listBuckets() async throws {
_ = try await client.listBuckets(input: ListBucketsInput())
}

Expand Down
4 changes: 3 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func addResolvedTargets() {
// MARK: - Generated

addDependencies(
clientRuntimeVersion: "0.38.0",
clientRuntimeVersion: "0.39.0",
crtVersion: "0.22.0"
)

Expand Down Expand Up @@ -488,6 +488,7 @@ let serviceTargets: [String] = [
"AWSNeptunedata",
"AWSNetworkFirewall",
"AWSNetworkManager",
"AWSNetworkMonitor",
"AWSNimble",
"AWSOAM",
"AWSOSIS",
Expand Down Expand Up @@ -584,6 +585,7 @@ let serviceTargets: [String] = [
"AWSSnowball",
"AWSSsmSap",
"AWSStorageGateway",
"AWSSupplyChain",
"AWSSupport",
"AWSSupportApp",
"AWSSynthetics",
Expand Down
2 changes: 1 addition & 1 deletion Package.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.33.0
0.34.0
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,8 @@ This SDK is open-source. Code is available on Github [here](https://github.com/

[AWSNetworkManager](../../../../../swift/api/awsnetworkmanager/latest)

[AWSNetworkMonitor](../../../../../swift/api/awsnetworkmonitor/latest)

[AWSNimble](../../../../../swift/api/awsnimble/latest)

[AWSOAM](../../../../../swift/api/awsoam/latest)
Expand Down Expand Up @@ -703,6 +705,8 @@ This SDK is open-source. Code is available on Github [here](https://github.com/

[AWSStorageGateway](../../../../../swift/api/awsstoragegateway/latest)

[AWSSupplyChain](../../../../../swift/api/awssupplychain/latest)

[AWSSupport](../../../../../swift/api/awssupport/latest)

[AWSSupportApp](../../../../../swift/api/awssupportapp/latest)
Expand Down
Loading

0 comments on commit 951c1b4

Please sign in to comment.