diff --git a/.github/workflows/library_net_tests.yml b/.github/workflows/library_net_tests.yml index 63e0c26fa..ef530a863 100644 --- a/.github/workflows/library_net_tests.yml +++ b/.github/workflows/library_net_tests.yml @@ -14,6 +14,15 @@ on: # https://github.com/dafny-lang/dafny/blob/master/.github/workflows/deep-tests.yml#L16 - cron: "30 16 * * *" +env: + # Used in examples + AWS_ENCRYPTION_SDK_EXAMPLE_KMS_KEY_ID: arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f + AWS_ENCRYPTION_SDK_EXAMPLE_KMS_KEY_ID_2: arn:aws:kms:eu-central-1:658956600833:key/75414c93-5285-4b57-99c9-30c1cf0a22c2 + AWS_ENCRYPTION_SDK_EXAMPLE_KMS_MRK_KEY_ID: arn:aws:kms:us-east-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + AWS_ENCRYPTION_SDK_EXAMPLE_KMS_MRK_KEY_ID_2: arn:aws:kms:eu-west-1:658956600833:key/mrk-80bd8ecdcd4342aebd84b7dc9da498a7 + AWS_ENCRYPTION_SDK_EXAMPLE_LIMITED_ROLE_ARN_US_EAST_1: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-Dafny-Role-us-west-2 + AWS_ENCRYPTION_SDK_EXAMPLE_LIMITED_ROLE_ARN_EU_WEST_1: arn:aws:iam::370957321024:role/GitHub-CI-ESDK-Dafny-Role-us-west-2 + jobs: testDotNet: # Don't run the nightly build on forks @@ -24,6 +33,7 @@ jobs: AwsEncryptionSDK ] dotnet-version: [ '6.0.x' ] + frameworks: [net6.0, net48] os: [ windows-latest, ubuntu-latest, @@ -110,3 +120,18 @@ jobs: else make test_net fi + + - name: Test Examples on ${{ matrix.frameworks }} + shell: bash + working-directory: ./${{ matrix.library }} + run: | + if [ "$RUNNER_OS" == "macOS" ]; then + DYLD_LIBRARY_PATH="/usr/local/opt/openssl@1.1/lib" + dotnet test \ + runtimes/net/Examples \ + --framework ${{ matrix.frameworks }} + else + dotnet test \ + runtimes/net/Examples \ + --framework ${{ matrix.frameworks }} + fi diff --git a/AwsEncryptionSDK/runtimes/net/ESDK.csproj b/AwsEncryptionSDK/runtimes/net/ESDK.csproj index 757726046..23503b234 100644 --- a/AwsEncryptionSDK/runtimes/net/ESDK.csproj +++ b/AwsEncryptionSDK/runtimes/net/ESDK.csproj @@ -31,7 +31,7 @@ - + - netcoreapp3.1;net452 - 7.3 + net6.0;net48 + 10 + enable false false