aboutsummaryrefslogtreecommitdiff
path: root/azure-pipelines.yml
diff options
context:
space:
mode:
Diffstat (limited to 'azure-pipelines.yml')
-rw-r--r--azure-pipelines.yml49
1 files changed, 34 insertions, 15 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 1cdf1c3a..17087351 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -6,30 +6,31 @@
trigger:
- master
-pool:
- vmImage: 'Ubuntu-16.04'
-
variables:
+ ArtifactFeed: NodeModules
buildConfiguration: 'Release'
ASPNETCORE_ENVIRONMENT: 'Development'
+pool:
+ vmImage: 'Ubuntu-16.04'
steps:
-- script: dotnet build --configuration $(buildConfiguration) --configfile nuget.config
- displayName: Dotnet Build
-
-- script: dotnet test Timeline.Tests --configuration $(buildConfiguration) --logger trx
- displayName: Dotnet Test
-
-- task: PublishTestResults@2
- condition: succeededOrFailed()
+- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
inputs:
- testRunner: VSTest
- testResultsFiles: '**/*.trx'
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
-- script: yarn install
+- script: yarn install --non-interactive
+ condition: ne(variables['CacheRestored'], 'true')
workingDirectory: Timeline/ClientApp
displayName: Yarn Install
+- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
+ inputs:
+ keyfile: '**/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock'
+ targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
+ vstsFeed: '$(ArtifactFeed)'
+
- script: yarn run test --no-watch --browsers=ChromeHeadless --reporters junit
workingDirectory: Timeline/ClientApp
displayName: Angular Test
@@ -40,7 +41,25 @@ steps:
testRunner: JUnit
testResultsFiles: '**/TESTS-*.xml'
-- script: dotnet publish Timeline/Timeline.csproj --configuration $(buildConfiguration) --output ./publish/
+- script: |
+ dotnet restore Timeline/Timeline-CI.csproj --configfile nuget.config
+ dotnet restore Timeline.Tests/Timeline.Tests-CI.csproj --configfile nuget.config
+ displayName: Dotnet Restore
+
+- script: dotnet test Timeline.Tests/Timeline.Tests-CI.csproj --configuration $(buildConfiguration) --no-restore --logger trx
+ displayName: Dotnet Test
+
+- task: PublishTestResults@2
+ condition: succeededOrFailed()
+ inputs:
+ testRunner: VSTest
+ testResultsFiles: '**/*.trx'
+
+- script: yarn build --prod
+ workingDirectory: Timeline/ClientApp
+ displayName: Client App Build
+
+- script: dotnet publish Timeline/Timeline-CI.csproj --configuration $(buildConfiguration) --no-restore --output ./publish/
displayName: Dotnet Publish
- task: PublishPipelineArtifact@0