Skip to content

CI for Demo-ImageSharp #54

CI for Demo-ImageSharp

CI for Demo-ImageSharp #54

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: ['3.1.x', '5.0.x', '6.0.x', '7.0.x']
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@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore NuGet packages
run: dotnet restore --verbosity normal
- name: Build solution
run: dotnet build --configuration Release --no-restore --verbosity normal
- name: Run tests
run: dotnet test --no-build --verbosity normal --logger:"html;LogFileName=../../TestResults-${{ matrix.os }}-dotnet_${{ matrix.dotnet-version }}.html"
- name: Upload test results
uses: actions/upload-artifact@v3
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