11# This workflow performs tests in .NET.
22name : test dotnet
33
4- on :
4+ on :
55 pull_request :
66 push :
77 branches :
1212 # (accordingly to the "nightly" parameter).
1313 inputs :
1414 nightly :
15- description : ' Run the nightly build'
15+ description : " Run the nightly build"
1616 required : false
1717 type : boolean
1818 schedule :
3030 if : (github.event_name != 'schedule' || github.repository_owner == 'aws')
3131 strategy :
3232 matrix :
33- library : [
34- DynamoDbEncryption,
35- ]
36- dotnet-version : [ '6.0.x' ]
37- os : [
38- macos-12,
39- ubuntu-latest,
40- windows-latest
41- ]
33+ library : [DynamoDbEncryption]
34+ dotnet-version : ["6.0.x"]
35+ os : [macos-12, ubuntu-latest, windows-latest]
4236 runs-on : ${{ matrix.os }}
4337 permissions :
4438 id-token : write
5246 git config --global core.longpaths true
5347 - uses : actions/checkout@v3
5448 with :
55- submodules : recursive
49+ submodules : recursive
5650
5751 - name : Setup .NET Core SDK ${{ matrix.dotnet-version }}
5852 uses : actions/setup-dotnet@v4
7367 library : ${{ matrix.library }}
7468 diff-generated-code : false
7569 update-and-regenerate-mpl : true
76-
77- - name : Download Dependencies
70+
71+ - name : Download Dependencies
7872 working-directory : ./${{ matrix.library }}
7973 run : make setup_net
8074
@@ -92,16 +86,16 @@ jobs:
9286 # This works because `node` is installed by default on GHA runners
9387 CORES=$(node -e 'console.log(os.cpus().length)')
9488 make transpile_net CORES=$CORES
95-
89+
9690 - name : Test ${{ matrix.library }} net48
9791 if : matrix.os == 'windows-latest'
9892 working-directory : ./${{ matrix.library }}
9993 shell : bash
10094 run : |
101- dotnet restore runtimes/net/tests
102- dotnet build runtimes/net/tests
103- make test_net FRAMEWORK=net48
104-
95+ dotnet restore runtimes/net/tests
96+ dotnet build runtimes/net/tests
97+ make test_net FRAMEWORK=net48
98+
10599 - name : Test ${{ matrix.library }} net6.0
106100 working-directory : ./${{ matrix.library }}
107101 shell : bash
@@ -113,12 +107,11 @@ jobs:
113107 else
114108 make test_net FRAMEWORK=net6.0
115109 fi
116-
110+
117111 - name : Test Build and Pack ${{ matrix.library}}
118112 shell : bash
119113 if : matrix.os != 'windows-latest'
120114 working-directory : ./${{ matrix.library }}
121115 run : |
122116 dotnet build runtimes/net /p:Configuration=Release -nowarn:CS0162,CS0168
123117 dotnet pack runtimes/net/DynamoDbEncryption.csproj --no-build /p:Configuration=Release --output build
124-
0 commit comments