Add PR test CI (#1997)

* Add PR test CI

* fix syntax

* run

* Add cache

* remove unused commit script

* Disable restore-keys

* Add condition to skip install if cache true

* .

* Update packages

* Update cmc map

* node v

* temp disable cache

* on

* .

* skip check

* try new cache

* Change badge run test
This commit is contained in:
mykola.eth 2020-04-27 12:47:15 -07:00 committed by GitHub
parent f1796156be
commit e07451bb86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 1432 additions and 952 deletions

View File

@ -15,12 +15,15 @@ jobs:
- name: Install Dependencies
run: npm ci
- name: Run scripts
run: |
run: |
npm run update:bep2
npm run resize
npm run format:all
npm run gen:list
- name: Run test
run: npm t
- name: Commit changes if any
if: success()
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_user_name: trust-wallet-merge-bot

18
.github/workflows/pr-ci.yml vendored Normal file
View File

@ -0,0 +1,18 @@
name: Pull Request CI
on:
push:
branches:
- '*'
- '!master'
pull_request:
branches: [master]
jobs:
pull_request_ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: bahmutov/npm-install@v1
- run: npm t

View File

@ -1,6 +1,6 @@
# Trust Wallet Assets Info
[![Build Status](https://dev.azure.com/TrustWallet/Assets/_apis/build/status/trustwallet.assets?branchName=master)](https://dev.azure.com/TrustWallet/Assets/_build/latest?definitionId=42&branchName=master)
![CI](https://github.com/trustwallet/assets/workflows/Daily%20Update/badge.svg)
## Overview
Hello and welcome to Trust Wallet assets info contribution guide. We appreciate your effort to open-source.

View File

@ -1,63 +0,0 @@
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
npm_config_cache: '$(Pipeline.Workspace)/.npm'
steps:
- checkout: self
persistCredentials: true
# - task: CmdLine@2
# displayName: Checkout $(Build.SourceBranchName)
# inputs:
# script: 'git checkout $(Build.SourceBranchName)'
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: Install Node.js
- task: Bash@3
displayName: Install global dependency
inputs:
targetType: inline
script: |
sudo npm install -g typescript
sudo npm install -g ts-node
- 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
- 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"
# - script: sudo npm run checksum
# workingDirectory: $(Build.SourcesDirectory)
# displayName: Run checksum script
# - task: Bash@3
# displayName: Commit result of checksum script
# inputs:
# targetType: filePath
# filePath: ./script/commit.sh
- script: npm t
displayName: Run tests

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

2185
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -41,24 +41,24 @@
"@trustwallet/types": "^0.1.37",
"@types/jest": "^25.2.1",
"@types/jest-expect-message": "^1.0.1",
"@types/node": "^13.11.0",
"@types/node": "^13.13.4",
"axios": "^0.19.2",
"bip44-constants": "^8.0.6",
"bip44-constants": "^8.0.11",
"bluebird": "^3.7.2",
"chalk": "^4.0.0",
"ethereum-checksum-address": "0.0.5",
"eztz-lib": "^0.1.2",
"image-size": "^0.8.3",
"is-image": "^3.0.0",
"jest": "^25.2.7",
"jest": "^25.4.0",
"jest-expect-message": "^1.0.2",
"nested-property": "^2.0.0",
"sharp": "^0.25.2",
"tinify": "^1.6.0-beta.2",
"ts-jest": "^25.3.1",
"ts-node": "^8.8.2",
"ts-jest": "^25.4.0",
"ts-node": "^8.9.1",
"typescript": "^3.8.3",
"web3": "^1.2.6"
"web3": "^1.2.7"
},
"dependencies": {},
"jest": {

View File

@ -1019,12 +1019,6 @@
"token_id": "0x4470BB87d77b963A013DB939BE332f927f2b992e",
"id": 1768
},
{
"coin": 60,
"type": "token",
"token_id": "0x8aA33A7899FCC8eA5fBe6A608A109c3893A1B8b2",
"id": 1771
},
{
"coin": 60,
"type": "token",
@ -1531,12 +1525,6 @@
"token_id": "0x2C974B2d0BA1716E644c1FC59982a89DDD2fF724",
"id": 2019
},
{
"coin": 60,
"type": "token",
"token_id": "0x168296bb09e24A88805CB9c33356536B980D3fC5",
"id": 2021
},
{
"coin": 60,
"type": "token",
@ -6410,12 +6398,6 @@
"token_id": "0x77C07555aF5ffdC946Fb47ce15EA68620E4e7170",
"id": 3519
},
{
"coin": 60,
"type": "token",
"token_id": "0x1563D521ba309e2Ad9f4aFfD6f4dE9759E8d4F21",
"id": 3520
},
{
"coin": 60,
"type": "token",
@ -7557,6 +7539,11 @@
"token_id": "0x763Fa6806e1acf68130D2D0f0df754C93cC546B2",
"id": 3870
},
{
"coin": 1642,
"type": "coin",
"id": 3871
},
{
"coin": 60,
"type": "token",
@ -8738,6 +8725,12 @@
"token_id": "0x307d45Afbb7E84F82ef3D251A6bb0F00Edf632E4",
"id": 4242
},
{
"coin": 60,
"type": "token",
"token_id": "0x13c2B7F851E756415cF7d51d04dcF4F94A5b382E",
"id": 4243
},
{
"coin": 60,
"type": "token",
@ -9035,6 +9028,12 @@
"type": "coin",
"id": 4512
},
{
"coin": 60,
"type": "token",
"token_id": "0xa0B207103F764A920b4AF9e691F5bd956DE14DED",
"id": 4518
},
{
"coin": 60,
"type": "token",
@ -9657,6 +9656,11 @@
"token_id": "0xE1bAD922F84b198A08292FB600319300ae32471b",
"id": 4953
},
{
"coin": 491,
"type": "coin",
"id": 4957
},
{
"coin": 60,
"type": "token",
@ -9759,6 +9763,12 @@
"token_id": "0x65Ac08c55F21d4A73CA1D429a17a6872b23bFd55",
"id": 5024
},
{
"coin": 60,
"type": "token",
"token_id": "0x5ABaFf0B83F81DC061C590AAdcbA013C69237fd7",
"id": 5025
},
{
"coin": 60,
"type": "token",
@ -10020,6 +10030,12 @@
"token_id": "WRX-ED1",
"id": 5161
},
{
"coin": 60,
"type": "token",
"token_id": "0x79C5a1Ae586322A07BfB60be36E1b31CE8C84A1e",
"id": 5165
},
{
"coin": 60,
"type": "token",
@ -10120,6 +10136,11 @@
"token_id": "0x02b1669bC9EE893edAFf3cADfD326A294d643f99",
"id": 5232
},
{
"coin": 515,
"type": "coin",
"id": 5234
},
{
"coin": 60,
"type": "token",
@ -10518,6 +10539,12 @@
"token_id": "0x1A3496C18d558bd9C6C8f609E1B129f67AB08163",
"id": 5429
},
{
"coin": 60,
"type": "token",
"token_id": "0xe96F2c381E267a96C29bbB8ab05AB7d3527b45Ab",
"id": 5430
},
{
"coin": 60,
"type": "token",
@ -10667,5 +10694,28 @@
"type": "token",
"token_id": "0xF25c91C87e0B1fd9B4064Af0F427157AaB0193A7",
"id": 5481
},
{
"coin": 60,
"type": "token",
"token_id": "0x4E12EB8e506Ccd1427F6b8F7faa3e88fB698EB28",
"id": 5486
},
{
"coin": 60,
"type": "token",
"token_id": "0x80bD0cc689c206e3F642919244c4251c7Ef19852",
"id": 5489
},
{
"coin": 60,
"type": "token",
"token_id": "0x686C650dbcFEaa75D09B883621Ad810F5952bD5d",
"id": 5509
},
{
"coin": 51,
"type": "coin",
"id": 5511
}
]

View File

@ -1,13 +0,0 @@
#!/bin/bash
if [[ `git status --porcelain --untracked-files=no` ]]; then
git add .
git commit -m "Checksum ERC20 addresses [skip ci]"
echo Pushing changes to branch: "$SYSTEM_PULLREQUEST_SOURCEBRANCH"
echo Current branch $(git branch)
git status
git push origin HEAD:"$SYSTEM_PULLREQUEST_SOURCEBRANCH"
echo Complete
else
echo "Nothing to commit"
fi