-
Notifications
You must be signed in to change notification settings - Fork 49
/
azure-pipelines.yml
63 lines (52 loc) · 1.96 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
variables:
system.debug: true
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.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)