Skip to content

Instantly share code, notes, and snippets.

View lira92's full-sized avatar

Alan Lira lira92

  • Toledo-PR
View GitHub Profile
@lira92
lira92 / tasks.json
Created August 1, 2018 03:41
Tasks Visual studio code
{
"label": "Test",
"type": "shell",
"command": "dotnet test [caminho do projeto de testes] /p:CollectCoverage=true /p:CoverletOutputFormat=opencover",
"group": "test",
"presentation": {
"reveal": "silent",
"panel": "shared"
}
},
@lira92
lira92 / generate-code-coverage.ps1
Last active November 14, 2018 13:01
Powershell to get all projects from path /test and run tests with coverage info.
if (-Not (Get-Command -Name reportgenerator -ErrorAction SilentlyContinue))
{
Write-Output "Instalando reportgenerator"
Invoke-Expression "dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.0.0"
}
Write-Output "Listando arquivos csproj"
$reports = [System.Collections.ArrayList]@()
Get-ChildItem -Path .\test -Recurse -Filter *.csproj -File | ForEach-Object {
Write-Output "Executando testes para o projeto $($_.BaseName)/$($_.Name)"
@lira92
lira92 / .deployment
Created December 4, 2018 21:02
Angular Deployment to Azure using Kudu
[config]
command = deploy.cmd
@lira92
lira92 / generate-code-coverage.ps1
Created February 6, 2019 20:56
Generate code coverage with coverlet and reportgenerator when there are many assemblies
param (
[string]$format = "opencover",
[bool]$nohtml = $false
)
if (-Not (Get-Command -Name reportgenerator -ErrorAction SilentlyContinue))
{
Write-Output "Installing reportgenerator"
Invoke-Expression "dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.0.9"
}