60 lines
No EOL
1.3 KiB
YAML
60 lines
No EOL
1.3 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
|
|
|
|
- bash: |
|
|
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'
|
|
|
|
- bash: |
|
|
set -euo pipefail
|
|
node --version
|
|
pnpm i
|
|
pnpm run build
|
|
displayName: 'Test on Node.js 16.x LTS'
|
|
|
|
- task: NodeTool@0
|
|
inputs:
|
|
versionSpec: '>=18.7.0'
|
|
displayName: 'Install Node.js Latest'
|
|
|
|
- bash: |
|
|
set -euo pipefail
|
|
node --version
|
|
node ./test-server/http.js &
|
|
dotnet run --project=./csharp/SVGLDLibs/SVGLDWebAPI/SVGLDWebAPI.csproj &
|
|
jobs
|
|
sleep 5
|
|
pnpm i
|
|
pnpm run test:nowatch
|
|
pnpm run build
|
|
kill -2 %1 %2 2>/dev/null
|
|
displayName: 'Test on Node.js 18.x Latest'
|
|
|
|
- publish: $(System.DefaultWorkingDirectory)/dist
|
|
artifact: svg-layout-designer |