Skip to content

chore: Add workflow for creating release notes. #932

chore: Add workflow for creating release notes.

chore: Add workflow for creating release notes. #932

Workflow file for this run

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:
run-unit-tests:
name: Run Unit Tests
runs-on: windows-latest
env:
test_results_path: tests\TestResults
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
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@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: UnitTestResults # Artifact name
path: ${{ env.test_results_path }} # Directory containing files to upload