Bump Microsoft.Extensions.DependencyInjection.Abstractions (#466) #274
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
# This work-flow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
# on: | |
# push: | |
# branches: [ "main" ] | |
# pull_request: | |
# branches: [ "main" ] | |
jobs: | |
# Fail if there are build warnings | |
# | |
# 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: | |
name: Build check | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: Setup dotnet 8.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.4xx' | |
source-url: https://pkgs.dev.azure.com/bertk0374/_packaging/intern/nuget/v3/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }} | |
- name: Setup dotnet 7.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '7.0.4xx' | |
source-url: https://pkgs.dev.azure.com/bertk0374/_packaging/intern/nuget/v3/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }} | |
- run: | | |
dotnet --list-sdks | |
echo "Run, Build Application using script" | |
./eng/commonlight/build.sh --build --restore | |
# Fail if there are any failed tests | |
# | |
# We support all current LTS versions of .NET and Windows, Mac and Linux. | |
# | |
# To check for failing tests locally run `dotnet test`. | |
# | |
# Although you can build previous versions of .NET 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 runtime installed. | |
test: | |
name: Tests for .net core ${{ matrix.framework }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
framework: ['net8.0', 'net7.0'] | |
timeout-minutes: 30 | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # avoid shallow clone so nbgv can do its work. | |
- name: Setup dotnet 8.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.4xx' | |
source-url: https://pkgs.dev.azure.com/bertk0374/_packaging/intern/nuget/v3/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }} | |
- run: | | |
echo "Run, Build Application using script" | |
./eng/commonlight/build.sh --build --restore --test | |
if: matrix.os == 'ubuntu-latest' | |
- run: | | |
echo "Run, Build Application using script" | |
./eng/commonlight/build.ps1 -build -restore -test | |
if: matrix.os == 'windows-latest' | |
- name: ReportGenerator | |
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.11 | |
with: | |
reports: ./artifacts/TestResults/**/coverage.cobertura.xml | |
assemblyfilters: -xunit*;-DotNet.ArcadeLight.Test.Common;-DotNet.Internal.DependencyInjection.Testing;-DotNet.XUnitExtensions; | |
targetdir: ./artifacts/CoverageReport | |
reporttypes: HtmlInline;Cobertura;MarkdownSummaryGithub;lcov | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: ./artifacts/CoverageReport/SummaryGithub.md | |
- name: Write to Job Summary | |
run: cat ./artifacts/CoverageReport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY | |
shell: bash | |
- name: Upload coverage report artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CoverageReport.${{matrix.os}}.${{matrix.framework}} # Artifact name | |
path: ./artifacts/CoverageReport # Directory containing files to upload |