onnxruntime/tools/ci_build/github/azure-pipelines/templates/linux-web-init-and-check.yml
Yulong Wang b29849a287
[js/common] fix typedoc warnings (#19933)
### Description
Fix a few warnings in typedoc (for generating JS API):
```
[warning] The signature TrainingSession.loadParametersBuffer has an @param with name "buffer", which was not used.
[warning] NonTensorType, defined in ./lib/onnx-value.ts, is referenced by OnnxValue but not included in the documentation.
[warning] TensorFactory, defined in ./lib/tensor-factory.ts, is referenced by Tensor but not included in the documentation.
[warning] ExternalDataFileType, defined in ./lib/onnx-model.ts, is referenced by InferenceSession.SessionOptions.externalData but not included in the documentation.
[warning] TensorToDataUrlOptions, defined in ./lib/tensor-conversion.ts, is referenced by Tensor.toDataURL.toDataURL.options but not included in the documentation.
[warning] TensorToImageDataOptions, defined in ./lib/tensor-conversion.ts, is referenced by Tensor.toImageData.toImageData.options but not included in the documentation.
[warning] Failed to resolve link to "GpuBufferType" in comment for Env.WebGpuFlags.adapter.
[warning] Failed to resolve link to "GpuBufferType" in comment for Env.WebGpuFlags.device.
```

Changes highlighted:
- Merge `CoreMlExecutionProviderOption` and
`CoreMLExecutionProviderOption`. They expose 2 set of different options
for React-native and ORT nodejs binding. This should be fixed in future.
- Fix a few inconsistency of names between JSDoc and parameters
- Fix broken type links
- Exclude trace functions
2024-03-15 19:01:50 -07:00

45 lines
1.7 KiB
YAML

steps:
- script: |
npm ci
workingDirectory: '$(Build.SourcesDirectory)/js'
displayName: 'npm ci /js/'
- script: |
npm ci
workingDirectory: '$(Build.SourcesDirectory)/js/common'
displayName: 'npm ci /js/common/'
- script: |
npm test
workingDirectory: '$(Build.SourcesDirectory)/js/common'
displayName: 'run onnxruntime-common tests'
- script: |
npm ci
workingDirectory: '$(Build.SourcesDirectory)/js/web'
displayName: 'npm ci /js/web/'
- script: |
npm run prebuild
workingDirectory: '$(Build.SourcesDirectory)/js/web'
displayName: 'run TypeScript type check in /js/web/'
- script: |
npm run lint
workingDirectory: '$(Build.SourcesDirectory)/js'
displayName: 'run ESLint'
- script: |
npm run format
workingDirectory: '$(Build.SourcesDirectory)/js'
displayName: 'Clang-format'
- script: |
node -e "a=require('child_process').execSync('git diff --name-only').toString();if(a)throw new Error('Following source files are not formatted: (did you run \"npm run format\"?)\n'+a)"
workingDirectory: '$(Build.SourcesDirectory)/js'
displayName: 'Check unformatted files'
- script: |
npx typedoc --emit none --treatWarningsAsErrors
workingDirectory: '$(Build.SourcesDirectory)/js/common'
displayName: 'TypeDoc Validation'
- script: |
npm run build:doc
workingDirectory: '$(Build.SourcesDirectory)/js/web'
displayName: 'Generating documents'
- script: |
node -e "a=require('child_process').execSync('git diff --name-only').toString();if(a)throw new Error('Following documents are not up-to-date: (did you run \"npm run build:doc\"?)\n'+a)"
workingDirectory: '$(Build.SourcesDirectory)/js/web'
displayName: 'Check out of dated documents'