Fixes to Entity Framework Configuration Bug #64 #46
This file contains 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: Webhooks PR Build | |
permissions: | |
contents: read | |
packages: read | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
name: "Build and Test" | |
strategy: | |
fail-fast: true | |
matrix: | |
dotnet: [ '6.0.x', '7.0.x', '8.0.x' ] | |
os: [ ubuntu-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET ${{ matrix.dotnet }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet }} | |
# - name: Set the TFM for .NET 6.0 (Ubuntu) | |
# if: matrix.dotnet == '6.0.x' && matrix.os == 'ubuntu-latest' | |
# run: echo "DOTNET_TFM=net6.0" >> $GITHUB_ENV | |
# - name: Set the TFM for .NET 7.0 (Ubuntu) | |
# if: matrix.dotnet == '7.0.x' && matrix.os == 'ubuntu-latest' | |
# run: echo "DOTNET_TFM=net7.0" >> $GITHUB_ENV | |
# - name: Set the TFM for .NET 8.0 (Ubuntu) | |
# if: matrix.dotnet == '8.0.x' && matrix.os == 'ubuntu-latest' | |
# run: echo "DOTNET_TFM=net8.0" >> $GITHUB_ENV | |
# - name: Set the TFM for .NET 6.0 (Windows) | |
# if: matrix.dotnet == '6.0.x' && matrix.os == 'windows-latest' | |
# run: echo "DOTNET_TFM=net6.0" >> $env:GITHUB_ENV | |
# - name: Set the TFM for .NET 7.0 (Windows) | |
# if: matrix.dotnet == '7.0.x' && matrix.os == 'windows-latest' | |
# run: echo "DOTNET_TFM=net7.0" >> $env:GITHUB_ENV | |
# - name: Set the TFM for .NET 8.0 (Windows) | |
# if: matrix.dotnet == '8.0.x' && matrix.os == 'windows-latest' | |
# run: echo "DOTNET_TFM=net8.0" >> $env:GITHUB_ENV | |
- name: Set the TFM in Ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
VERSION=$(echo "${{ matrix.dotnet }}" | sed 's/[^0-9.]*//g') | |
VERSION=$(echo "${VERSION}" | sed 's/\.$//') | |
DOTNET_TFM="net${VERSION}" | |
echo "DOTNET_TFM=$DOTNET_TFM" >> $GITHUB_ENV | |
- name: Set the TFM in Windows | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
$VERSION = "${{ matrix.dotnet }}".Substring(0, "${{ matrix.dotnet }}".LastIndexOf('.')) | |
$DOTNET_TFM = "net$VERSION" | |
echo "DOTNET_TFM=$DOTNET_TFM" | Out-File -FilePath $env:GITHUB_ENV -Append | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore -c Release -f ${{ env.DOTNET_TFM }} | |
- name: Test | |
run: dotnet test --no-build --verbosity normal -c Release -f ${{ env.DOTNET_TFM }} |