This improve greatly the performance and the code cleaning. It allows us to separate the inseparable class methods into modules functions
57 lines
No EOL
1.2 KiB
YAML
57 lines
No EOL
1.2 KiB
YAML
# Node.js with React
|
|
# Build a Node.js project that uses React.
|
|
# Add steps that analyze code, save build artifacts, deploy, and more:
|
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
|
|
|
|
trigger:
|
|
- master
|
|
- dev
|
|
- dev*
|
|
|
|
pool:
|
|
vmImage: ubuntu-latest
|
|
|
|
variables:
|
|
pnpm_config_cache: $(Pipeline.Workspace)/.pnpm-store
|
|
|
|
steps:
|
|
- task: Cache@2
|
|
inputs:
|
|
key: 'pnpm | "$(Agent.OS)" | pnpm-lock.yaml'
|
|
path: $(pnpm_config_cache)
|
|
displayName: Cache pnpm
|
|
|
|
- script: |
|
|
curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
|
|
pnpm config set store-dir $(pnpm_config_cache)
|
|
displayName: "Setup pnpm"
|
|
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '16.x'
|
|
displayName: 'Install Node.js 16.x LTS'
|
|
|
|
- script: |
|
|
node --version
|
|
node ./test-server/node-http.js &
|
|
jobs
|
|
pnpm i
|
|
pnpm run test:nowatch
|
|
pnpm run build
|
|
kill -2 %1 2>/dev/null
|
|
displayName: 'Test on Node.js 16.x LTS'
|
|
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '>=18.7.0'
|
|
displayName: 'Install Node.js Latest'
|
|
|
|
- script: |
|
|
node --version
|
|
node ./test-server/node-http.js &
|
|
jobs
|
|
pnpm i
|
|
pnpm run test:nowatch
|
|
pnpm run build
|
|
kill -2 %1 2>/dev/null
|
|
displayName: 'Test on Node.js 18.x Latest' |