Skip to content
This repository has been archived by the owner on Dec 21, 2024. It is now read-only.

Fix codecov

Fix codecov #139

Workflow file for this run

name: Build Test
on:
push:
branches: [ "main", "dev" ]
jobs:
build:
strategy:
matrix:
targetplatform: [x64]
runs-on: windows-latest
env:
Project_File: FAFB-PowerShell-Tool\FAFB-PowerShell-Tool.csproj
Coverlet_File: FAFB-PowerShell-Tool\FAFB-PowerShell-Tool.Tests\coverage.cobertura.xml
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'
- name: Install Active Directory Module
run: |
Install-WindowsFeature RSAT-AD-PowerShell
Import-Module ActiveDirectory
- name: Dotnet Restore & Build
run: dotnet build $env:Project_File -c Debug -f net6.0-windows -r win-${{ matrix.targetplatform }}
- name: Dotnet Test with Coverage
run: |
dotnet test $env:Project_File --no-build --logger "trx;LogFileName=test_results.trx" /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=TestResults/Coverage/
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: $env:Coverlet_File
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true