Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanduplenskikh committed Nov 5, 2024
1 parent d628aec commit 326a518
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
28 changes: 18 additions & 10 deletions azure-pipelines-steps-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,31 @@ steps:
inputs:
workingFile: .npmrc

- script: npm ci
- task: Npm@1
inputs:
command: ci
customRegistry: useNpmrc
workingDir: node
displayName: (task-lib) npm ci
workingDirectory: node

- script: npm test
workingDirectory: node
- task: Npm@1
inputs:
command: test
customRegistry: useNpmrc
workingDir: node
displayName: (task-lib) npm test

# Only on Linux. For CI runs on master, automatically publish packages
- ${{ if eq(parameters.os, 'Linux') }}:
- bash: |
cp -f ../.npmrc .npmrc
npm publish || true # Ignore publish failures, usually will happen because package already exists
rm -f .npmrc
- task: Npm@1
inputs:
command: publish
verbose: true
customRegistry: useNpmrc
workingDir: node/_build
publishRegistry: 'useFeed'
publishFeed: 'c86767d8-af79-4303-a7e6-21da0ba435e2/2442ccb9-e127-4ec5-99e5-28dd29f92057'
displayName: (task-lib) Publish the package to Azure DevOps Feed
workingDirectory: node/_build
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), in(variables['build.sourcebranch'], 'refs/heads/master'))

- bash: |
echo //registry.npmjs.org/:_authToken=\${NPM_TOKEN} > .npmrc
Expand Down
2 changes: 1 addition & 1 deletion node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-pipelines-task-lib",
"version": "4.17.3",
"version": "0.999.999",
"description": "Azure Pipelines Task SDK",
"main": "./task.js",
"typings": "./task.d.ts",
Expand Down

0 comments on commit 326a518

Please sign in to comment.