Skip to content

Commit

Permalink
Merge pull request #62 from stone-payments/feature/add-azure-pipelines
Browse files Browse the repository at this point in the history
Adds Azure Pipelines CI
  • Loading branch information
matheusriboli authored Jul 18, 2024
2 parents 276e070 + 082a94b commit b2eaf98
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 70 deletions.
36 changes: 0 additions & 36 deletions Build.ps1

This file was deleted.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# StrangerData - A .NET database populator for testing purposes

[![Travis](https://travis-ci.org/stone-pagamentos/StrangerData.svg?branch=master)](https://travis-ci.org/stone-pagamentos/StrangerData)

## Project Description ##
StrangerData is a tool designed to automatically fills your database with random data to make your unit/integration tests faster.
The generator will auto maps all foreign keys and generates records to related tables.
Expand Down
3 changes: 3 additions & 0 deletions StrangerData.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2E7DA56A-5858-41A7-9E24-15C4F16725D1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{27D63A1A-217A-4B44-8E03-1D24FF54055D}"
ProjectSection(SolutionItems) = preProject
azure-pipelines.yml = azure-pipelines.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Dialect", "Dialect", "{3EE881EC-A9FE-40DF-ACFC-DAFD844013F9}"
EndProject
Expand Down
32 changes: 0 additions & 32 deletions appveyor.yml

This file was deleted.

52 changes: 52 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
trigger:
- "*"
name: $(Date:yyyyMMdd)$(Rev:.r)

jobs:
- job: buildNugetPackage
displayName: "Build packages"
pool:
vmImage: 'ubuntu-latest'
variables:
sourceDirectory: $(System.DefaultWorkingDirectory)
buildConfiguration: 'Release'
testResultsDirectory: $(System.DefaultWorkingDirectory)/TestResults
coverageSummaryFile: $(testResultsDirectory)/**/coverage.cobertura.xml
steps:
- task: DotNetCoreCLI@2
displayName: "Restore solution"
inputs:
command: 'restore'
projects: '$(sourceDirectory)'
feedsToUse: 'select'
vstsFeed: 'ProcessorArtifacts'

- script: dotnet test $(sourceDirectory) --configuration Debug --no-restore --logger trx
displayName: 'Run tests'

- task: PublishTestResults@2
displayName: "Publish test results"
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: '**/*.trx'
searchFolder: '$(testResultsDirectory)'
failTaskOnFailedTests: true
buildConfiguration: '$(buildConfiguration)'

- task: PublishCodeCoverageResults@1
displayName: "Publish code coverage"
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(coverageSummaryFile)

- powershell: |
$cmd = 'dotnet pack --configuration $(buildConfiguration) --output "$(Build.ArtifactStagingDirectory)" --verbosity Normal'
If ('$(ShouldOverridePackageVersion)' -Eq 'true') { $cmd += ' -p:PackageVersion=$(OverridenPackageVersion)' }
Write-Output "ShouldOverridePackageVersion: $(ShouldOverridePackageVersion)";
Write-Output "$cmd"
Invoke-Expression $cmd;
displayName: 'Pack projects'
- publish: "$(Build.ArtifactStagingDirectory)"
artifact: drop
displayName: 'Publish Artifacts: drop'

0 comments on commit b2eaf98

Please sign in to comment.