Skip to content

Remove SonarCloud and NDepend from dotnet.yml #503

Remove SonarCloud and NDepend from dotnet.yml

Remove SonarCloud and NDepend from dotnet.yml #503

Workflow file for this run

name: .NET
on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build /p:CollectCoverage=true /p:CoverletOutput=coverage /p:CoverletOutputFormat=opencover
- name: Copy coverage files
run: |
mkdir '${{ github.workspace }}/coverage'
find . -name "*.opencover.xml" -exec sh -c 'cp "$0" "coverage/coverage-$(basename $0)"' {} \;
- name: List coverage files
run: ls '${{ github.workspace }}/coverage/'
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}