diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..a5647a4 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,34 @@ +name: .NET + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ ubuntu-latest, windows-latest, macos-latest ] + dotnet: [ '6.0', '8.0' ] + + steps: + - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + id: stepid + with: + dotnet-version: ${{ matrix.dotnet }} + # By default, tests will be executed under the latest installed version! + - name: Create temporary global.json + run: echo '{"sdk":{"version":"${{steps.stepid.outputs.dotnet-version}}"}}' > ./global.json + - name: Restore packages + run: dotnet restore -p:TargetFrameworks="net${{ matrix.dotnet }}" -p:LangVersion="latest" + - name: Build solution + run: dotnet build --no-restore --configuration Release -p:TargetFrameworks="net${{ matrix.dotnet }}" -p:LangVersion="latest" --verbosity normal + - name: Run tests + run: dotnet test --configuration Release --no-build --verbosity normal -p:TargetFrameworks="net${{ matrix.dotnet }}" -p:LangVersion="latest" diff --git a/SqliteCache.AspNetCore/SqliteCache.AspNetCore.csproj b/SqliteCache.AspNetCore/SqliteCache.AspNetCore.csproj index 87d4977..19f3b12 100755 --- a/SqliteCache.AspNetCore/SqliteCache.AspNetCore.csproj +++ b/SqliteCache.AspNetCore/SqliteCache.AspNetCore.csproj @@ -3,7 +3,7 @@ NeoSmart.Caching.Sqlite.AspNetCore NeoSmart.Caching.Sqlite.AspNetCore - netstandard2.1 + netstandard2.1 enable 11 8.0.0 diff --git a/SqliteCache.Tests/SqliteCache.Tests.csproj b/SqliteCache.Tests/SqliteCache.Tests.csproj index 7e93f0c..94c70ca 100755 --- a/SqliteCache.Tests/SqliteCache.Tests.csproj +++ b/SqliteCache.Tests/SqliteCache.Tests.csproj @@ -1,7 +1,6 @@ - net462;netcoreapp3.1;net5.0;net6.0;net8.0 preview false NeoSmart.Caching.Sqlite.Tests @@ -9,6 +8,17 @@ true + + + + net462;net6.0;net8.0 + + + + + net6.0;net8.0 + + @@ -30,3 +40,5 @@ + + diff --git a/SqliteCache/SqliteCache.csproj b/SqliteCache/SqliteCache.csproj index 9dee9aa..2e95b89 100755 --- a/SqliteCache/SqliteCache.csproj +++ b/SqliteCache/SqliteCache.csproj @@ -1,7 +1,8 @@ - netstandard2.0;netcoreapp3.1;net5.0;net6.0;net8.0 + + netstandard2.0;net6.0;net8.0 9.0 NeoSmart.Caching.Sqlite NeoSmart.Caching.Sqlite