Skip to content

chore(main): release 10.17.0 #1158

chore(main): release 10.17.0

chore(main): release 10.17.0 #1158

name: .NET Agent Unit Tests and Code Coverage
on:
push:
branches:
- main # runs after a completed PR to main
pull_request: # runs on a PR to any branch
workflow_dispatch: # allows for manual trigger
env:
DOTNET_NOLOGO: true
NR_DEV_BUILD_HOME: false
# only allow one instance of this workflow to be running per PR or branch, cancels any that are already running
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check-modified-files:
name: Check if source files were modified, skip remaining jobs if not
uses: ./.github/workflows/check_modified_files.yml
secrets: inherit
permissions:
contents: read
pull-requests: read
run-unit-tests:
name: Run Unit Tests
needs: check-modified-files
runs-on: windows-latest
# don't run this job if triggered by Dependabot, will cause all other jobs to be skipped as well
# run this job if non-workflow files were modified, or if triggered by a manual execution
if: github.actor != 'dependabot[bot]' && (needs.check-modified-files.outputs.non-workflow-files-changed == 'true' || github.event_name == 'workflow_dispatch')
env:
test_results_path: tests\TestResults
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3.2.0
with:
dotnet-version: 7.x
dotnet-quality: 'ga'
- name: Restore NuGet Packages
run: dotnet restore
- name: Build & Run Unit Tests
run: dotnet test --verbosity minimal --no-restore --settings tests\UnitTests.runsettings --results-directory ${{ env.test_results_path }}
- name: Upload coverage reports to Codecov.io
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
flags: Agent
directory: ${{ env.test_results_path }}
- name: Upload coverage report artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: UnitTestResults # Artifact name
path: ${{ env.test_results_path }} # Directory containing files to upload