Skip to content

Commit

Permalink
Update azure-pipelines.yml polishing the performance increases.
Browse files Browse the repository at this point in the history
Update azure-pipelines.yml polishing the performance increases.
  • Loading branch information
jeremiahjordanisaacson authored Dec 17, 2024
1 parent 8a58f7d commit 9449d40
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ steps:
displayName: 'npm ci'
workingDirectory: $(Build.SourcesDirectory) # Ensure it runs from the correct directory

# Cache node_modules for staging build (Optional optimization) - after npm ci
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: $(Pipeline.Workspace)/.npm
displayName: 'Cache node_modules for staging'

# Run tests
- script: |
npm run test-ci
Expand All @@ -41,15 +50,6 @@ steps:
npm run "$(stageBuildConfiguration)"
displayName: 'npm run optimized $(stageBuildConfiguration)'

# Cache node_modules for staging build (Optional optimization)
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
npm | "$(Agent.OS)"
path: $(Pipeline.Workspace)/.npm
displayName: 'Cache node_modules for staging'

# Publish build artifacts for staging
- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory) for Staging'
Expand All @@ -72,7 +72,7 @@ steps:
npm run "$(productionBuildConfiguration)"
displayName: 'npm run optimized $(productionBuildConfiguration)'

# Cache node_modules for production build (Optional optimization)
# Cache node_modules for production build (Optional optimization) - after npm ci
- task: Cache@2
inputs:
key: 'npm | "$(Agent.OS)" | package-lock.json'
Expand Down

0 comments on commit 9449d40

Please sign in to comment.