updating to net8 and updating packages to latest #82
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: dotNET Build & Test | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
sdk: [7.0.x] | |
fail-fast: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.sdk }} | |
dotnet-quality: 'preview' | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore | |
- name: Test & Cover | |
run: dotnet test --no-build | |
- name: ReportGenerator | |
if: matrix.os == 'ubuntu-latest' | |
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.13 | |
with: | |
reports: './tests/coverage/*/*.xml' | |
targetdir: '$GITHUB_WORKSPACE/coveragereport' | |
reporttypes: Html;Html_Dark;Cobertura | |
sourcedirs: './src' # Optional directories which contain the corresponding source code (separated by semicolon). The source directories are used if coverage report contains classes without path information. | |
historydir: '' # Optional directory for storing persistent coverage information. Can be used in future reports to show coverage evolution. | |
plugins: '' # Optional plugin files for custom reports or custom history storage (separated by semicolon). | |
assemblyfilters: '+*' # Optional list of assemblies that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed. | |
classfilters: '+*' # Optional list of classes that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed. | |
filefilters: '+*' # Optional list of files that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed. | |
verbosity: 'Verbose' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off | |
title: 'JsonTranslate.NET' # Optional title. | |
tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version. | |
customSettings: '' # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings. | |
toolpath: 'reportgeneratortool' # Default directory for installing the dotnet tool. | |
- uses: codecov/codecov-action@v3 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: $GITHUB_WORKSPACE/coveragereport/Cobertura.xml | |
flags: unittests # optional | |
name: JsonTranslate.NET # optional | |
verbose: true # optional (default = false) | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v3 | |
if: matrix.os == 'ubuntu-latest' | |
with: | |
name: code-coverage-report | |
path: $GITHUB_WORKSPACE/coveragereport |