Skip to content

Revert "Fix Shared project, edit azure-pipelines.yml" #10

Revert "Fix Shared project, edit azure-pipelines.yml"

Revert "Fix Shared project, edit azure-pipelines.yml" #10

# Universal Windows Platform

Check failure on line 1 in .github/workflows/azure-pipelines.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/azure-pipelines.yml

Invalid workflow file

(Line: 6, Col: 1): Unexpected value 'trigger', (Line: 12, Col: 1): Unexpected value 'pool', (Line: 15, Col: 1): Unexpected value 'variables', (Line: 23, Col: 1): A sequence was not expected
# Build a Universal Windows Platform project using Visual Studio.
# Add steps that test and distribute an app, save build artifacts, and more:
# https://aka.ms/yaml
trigger:
branches:
include:
- feature/*
- fix/*
pool:
vmImage: 'windows-2022'
variables:
solution: '**/**/FolderIconPainter.sln'
UnitTestProject: '**/**/**/src/FIP.UnitTests.csproj'
buildPlatform: 'x64'
buildConfiguration: 'Debug'
appxPackageDir: '$(Build.ArtifactStagingDirectory)\AppxPackages\\'
jobs:
- job: Build
displayName: 'Build & Run Tests'
timeoutInMinutes: 10
steps:
- task: NuGetToolInstaller@1
displayName: Install NuGet 5.8.0
inputs:
versionSpec: 5.8.0
- task: NuGetCommand@2
displayName: Restore NuGet Packages for Folder Icon Painter
inputs:
command: 'restore'
restoreSolution: '$(solution)'
- task: DotNetCoreCLI@2
displayName: 'Build Folder Icon Painter Package'
inputs:
command: 'publish'
publishWebProjects: false
projects: '$(solution)'
arguments: '/p:AppxPackageDir="$(appxPackageDir)"
/p:platform="$(buildPlatform)"
/p:configuration="$(buildConfiguration)"
/p:PublishProfile="./FIP.Core/Properties/PublishProfiles/win-$(buildPlatform).pubxml"'
zipAfterPublish: false
modifyOutputPath: false
- script: |
dir /b /s $(Build.ArtifactStagingDirectory)
dir /b /s $(System.DefaultWorkingDirectory)
displayName: 'List contents of ArtifactStagingDirectory and DefaultWorkingDirectory'
- task: DotNetCoreCLI@2
displayName: 'Run Unit Tests'
inputs:
command: 'test'
projects: '$(UnitTestProject)'
arguments: '--configuration Debug --logger trx --results-directory $(Agent.TempDirectory)/UnitTestsResults'
- task: PublishTestResults@2
displayName: 'Publish Unit Test Results'
inputs:
testResultsFormat: VSTest
testResultsFiles: '**\*.trx'
searchFolder: '$(Agent.TempDirectory)/UnitTestsResults'
failTaskOnFailedTests: true
testRunTitle: 'xUnit tests'