Hi! Your script doesn't seem to be wrong, but I have no information on how your test is working. I wonder if you have tried your Test locally and it works fine.
My Unit Test run for an hour and don't finish on Azure Pipeline
Jakub Jankiewicz
0
Reputation points
I have an Open Source project I'm maintaining that was created by someone else.
And the last run of the Azure Pipeline tool 60 minus and stop. The tests should run for 2-4 minutes max.
I thought that it was the last change I did, but when I revert the change Azure run the same for 60 minutes and stop in the middle.
This is my azure-pipeline config:
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Install Node.js'
- script: npm ci
displayName: 'Install dependencies'
- script: npm run build
displayName: 'Webpack build'
- script: npm test
displayName: 'Run tests'
env:
BROWSER_STACK_ACCESS_KEY: $(BROWSER_STACK_ACCESS_KEY)
BROWSER_STACK_USERNAME: $(BROWSER_STACK_USERNAME)
BUNDLEWATCH_GITHUB_TOKEN: $(BUNDLEWATCH_GITHUB_TOKEN)
SAUCE_ACCESS_KEY: $(SAUCE_ACCESS_KEY)
SAUCE_USERNAME: $(SAUCE_USERNAME)
TEST_BROWSERS: 'ChromeHeadlessNoSandbox,FirefoxHeadless,sl_edge,sl_safari,sl_ios_safari,bs_android_chrome'
- task: PublishTestResults@2
displayName: 'Save test results'
condition: succeededOrFailed()
inputs:
testResultsFormat: JUnit
testResultsFiles: '$(System.DefaultWorkingDirectory)/junit/*.xml'
- task: PublishCodeCoverageResults@1
displayName: 'Save code coverage'
condition: and(succeededOrFailed(), ne(variables['system.pullrequest.isfork'], true))
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage/lcov-report'
- script: npm pack
displayName: 'Prepare installable tarball'
condition: succeededOrFailed()
- task: PublishBuildArtifacts@1
displayName: 'Save npm-tarball.tgz'
condition: and(succeededOrFailed(), ne(variables['system.pullrequest.isfork'], true))
inputs:
artifactName: 'npm-tarball.tgz'
PathtoPublish: '$(System.DefaultWorkingDirectory)/isomorphic-git-lightning-fs-0.0.0-development.tgz'
- script: npm run semantic-release
displayName: 'Publish to npm'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
env:
GH_TOKEN: $(GITHUB_TOKEN)
NPM_TOKEN: $(Npm.Token)
This is the project:
https://dev.azure.com/isomorphic-git/isomorphic-git/_build?definitionId=7
It seems that the Job finished (task npm test) in a few minutes but the state froze in waiting for nothing and canceled after an hour.
Community Center | Not monitored
46,309 questions