Skip to content

use System.CommandLine instead McMaster.Extensions.CommandLineUtils #1135

use System.CommandLine instead McMaster.Extensions.CommandLineUtils

use System.CommandLine instead McMaster.Extensions.CommandLineUtils #1135

Workflow file for this run

# For details of what checks are run for PRs please refer below
name: .NET Core CI
on: [pull_request, workflow_dispatch]
jobs:
# Fail if there are build warnings
#
# As a general code quality check we use FxCop analyzers.
#
# To check for build warnings locally you may need to run a clean build.
#
# This can be done by running `dotnet clean` before running `dotnet build`
build-warnings:
name: Build warnings check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/[email protected]
- name: Setup dotnet
uses: actions/[email protected]
with:
dotnet-version: |
7.x
- name: Build
run: dotnet build /WarnAsError
# Fail if there are any failed tests
#
# We support all current LTS versions of .NET Core and Windows, Mac and Linux.
#
# To check for failing tests locally run `dotnet test`.
#
# Although you can build previous versions of .NET Core projects with the
# latest SDK you can't run them. So to run tests for all target versions you
# will need all current LTS version runtimes installed.
#
# If installing all required runtimes is problematic you can specify a
# particular version like this `dotnet test --framework netcoreapp2.1`.
test:
name: Tests for .net core ${{ matrix.framework }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
framework: ['net6.0','net7.0']
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Setup dotnet 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.x'
- name: Setup dotnet 6
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x'
- name: Tests
run: dotnet test --framework ${{ matrix.framework }} --collect:"XPlat Code Coverage;Format=cobertura" --results-directory "TestResults"
# see https://github.com/danielpalme/ReportGenerator/blob/main/.github/workflows/ci.yml
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5
with:
reports: 'TestResults/**/coverage.cobertura.xml'
targetdir: 'coveragereport'
reporttypes: 'HtmlInline;Cobertura'
- name: Upload coverage report artifact
uses: actions/upload-artifact@v3
with:
name: CoverageReport
path: coveragereport