@@ -30,26 +30,34 @@ jobs:
3030      with :
3131        dotnet-version : ${{ matrix.dotnet }} 
3232
33-     - name : Set the TFM for .NET 6.0  
34-       if : matrix.dotnet == '6.0.x'  
35-       run : echo "DOTNET_TFM=net6.0" >> $GITHUB_ENV 
36- 
37-     -  name :  Set the TFM for .NET 7.0 
38-       if :  matrix.dotnet == '7.0.x' 
39-       run :  echo "DOTNET_TFM=net7.0 " >> $GITHUB_ENV 
33+     - name : Set the TFM in Ubuntu  
34+       if : startsWith( matrix.os, 'ubuntu') 
35+       run : | 
36+           VERSION=$(echo "${{ matrix.dotnet }}" | sed 's/[^0-9.]*//g') 
37+           VERSION=$(echo "${VERSION}" | sed 's/\.$//')  
38+           DOTNET_TFM="net${VERSION}"  
39+            echo "DOTNET_TFM=$DOTNET_TFM " >> $GITHUB_ENV 
4040
41-     - name : Set the TFM for .NET 8.0 
42-       if : matrix.dotnet == '8.0.x' 
43-       run : echo "DOTNET_TFM=net8.0" >> $GITHUB_ENV 
41+ name : Set the TFM in Windows 
42+       if : startsWith(matrix.os, 'windows') 
43+       run : | 
44+           $VERSION = "${{ matrix.dotnet }}".Substring(0, "${{ matrix.dotnet }}".LastIndexOf('.')) 
45+           $DOTNET_TFM = "net$VERSION" 
46+           echo "DOTNET_TFM=$DOTNET_TFM" | Out-File -FilePath $env:GITHUB_ENV -Append 
4447           
4548name : Restore dependencies 
4649      run : dotnet restore 
4750
4851    - name : Build 
4952      run : dotnet build --no-restore -c Release /p:Version=$VERSION -f ${{ env.DOTNET_TFM }} 
5053
51-     - name : Test 
52-       run : dotnet test --no-build --verbosity normal -c Release -f ${{ env.DOTNET_TFM }} /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.XUnit]*" 
54+     - name : Test (Ubuntu) 
55+       if : startsWith(matrix.os, 'ubuntu-latest') 
56+       run : dotnet test --no-build --verbosity normal -c  Release -f ${{ env.DOTNET_TFM }} /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude="[*.XUnit]*" 
57+ 
58+     - name : Test (Windows) 
59+       if : startsWith(matrix.os, 'windows') 
60+       run : dotnet test --no-build --verbosity normal -c  Release -f ${{ env.DOTNET_TFM }} --filter DB!=SQLServer 
5361
5462    - name : Collect to Codecov 
5563      uses : codecov/codecov-action@v3 
0 commit comments