Disable locked restore #83
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: Continuous Integration | |
on: [push, pull_request] | |
env: | |
Configuration: Release | |
ContinuousIntegrationBuild: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_NOLOGO: true | |
jobs: | |
package: | |
strategy: | |
matrix: | |
os: [ macos-latest, ubuntu-latest, windows-latest ] | |
dotnet-version: ['5.0', '6.0', '7.0', '8.0'] | |
exclude: | |
- os: macos-latest | |
dotnet-version: 5.0 | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: Build and run tests | |
steps: | |
- name: Checkout git repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }} | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Restore test project | |
run: dotnet restore --no-dependencies -p:TargetFramework=net${{ matrix.dotnet-version }} --verbosity normal QrCodeGeneratorTest | |
- name: Restore library | |
run: dotnet restore --verbosity normal QrCodeGenerator | |
- name: Build library | |
run: dotnet build --configuration Release --no-restore -p:TargetFramework=netstandard2.0 --verbosity normal QrCodeGenerator | |
- name: Build test project | |
run: dotnet build --configuration Release --no-restore -p:TargetFramework=net${{ matrix.dotnet-version }} --verbosity normal QrCodeGeneratorTest | |
- name: Run tests | |
run: dotnet test --configuration Release --no-build -P:TargetFramework=net${{ matrix.dotnet-version }} --logger:"html;LogFileName=../../TestResults-${{ matrix.os }}-dotnet_${{ matrix.dotnet-version }}.html" --verbosity normal QrCodeGeneratorTest | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: TestResults-${{ matrix.os }}-dotnet_${{ matrix.dotnet-version }}.html | |
path: TestResults-${{ matrix.os }}-dotnet_${{ matrix.dotnet-version }}.html | |
- name: Create and validate NuGet package | |
run: dotnet pack --no-build --verbosity normal | |
if: ${{ matrix.os != 'macos-latest' }} |