2020-01-17 05:15:14 +00:00
|
|
|
trigger:
|
2020-02-19 02:00:11 +00:00
|
|
|
- master
|
2020-01-17 05:15:14 +00:00
|
|
|
|
|
|
|
pool:
|
2020-02-19 02:00:11 +00:00
|
|
|
vmImage: 'ubuntu-latest'
|
2020-01-17 05:15:14 +00:00
|
|
|
|
|
|
|
variables:
|
2020-02-19 02:00:11 +00:00
|
|
|
npm_config_cache: '$(Pipeline.Workspace)/.npm'
|
2020-01-17 05:15:14 +00:00
|
|
|
|
|
|
|
steps:
|
2020-02-19 02:00:11 +00:00
|
|
|
- checkout: self
|
|
|
|
persistCredentials: true
|
|
|
|
|
|
|
|
# - task: CmdLine@2
|
|
|
|
# displayName: Checkout $(Build.SourceBranchName)
|
|
|
|
# inputs:
|
|
|
|
# script: 'git checkout $(Build.SourceBranchName)'
|
2020-01-17 05:15:14 +00:00
|
|
|
|
2020-02-19 02:00:11 +00:00
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: '12.x'
|
|
|
|
displayName: Install Node.js
|
2020-02-27 00:10:15 +00:00
|
|
|
|
|
|
|
- task: Bash@3
|
2020-02-19 02:00:11 +00:00
|
|
|
displayName: Install global dependency
|
2020-02-27 00:10:15 +00:00
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: |
|
|
|
|
sudo npm install -g typescript
|
|
|
|
sudo npm install -g ts-node
|
2020-02-19 02:00:11 +00:00
|
|
|
|
|
|
|
- task: Npm@1
|
|
|
|
inputs:
|
|
|
|
command: install
|
|
|
|
verbose: true
|
|
|
|
displayName: Install dependencies
|
|
|
|
# - task: Cache@2
|
|
|
|
# inputs:
|
|
|
|
# key: 'npm | "$(Agent.OS)" | package-lock.json'
|
|
|
|
# path: $(npm_config_cache)
|
|
|
|
# displayName: Cache npm
|
2020-02-27 00:10:15 +00:00
|
|
|
|
|
|
|
- task: Bash@3
|
|
|
|
displayName: Set git config
|
|
|
|
inputs:
|
|
|
|
targetType: inline
|
|
|
|
script: |
|
|
|
|
git config --global user.email "bot@trustwallet.com"
|
|
|
|
git config --global user.name "TrustWalletBot"
|
|
|
|
|
2020-01-20 05:30:16 +00:00
|
|
|
|
2020-03-25 04:02:32 +00:00
|
|
|
# - script: sudo npm run checksum
|
2020-02-27 21:55:38 +00:00
|
|
|
# workingDirectory: $(Build.SourcesDirectory)
|
|
|
|
# displayName: Run checksum script
|
2020-01-17 05:15:14 +00:00
|
|
|
|
2020-02-27 21:55:38 +00:00
|
|
|
# - task: Bash@3
|
|
|
|
# displayName: Commit result of checksum script
|
|
|
|
# inputs:
|
|
|
|
# targetType: filePath
|
|
|
|
# filePath: ./script/commit.sh
|
2020-02-19 02:00:11 +00:00
|
|
|
|
|
|
|
- script: npm t
|
|
|
|
displayName: Run tests
|