Fix validator (#16045)

This commit is contained in:
Daniel 2021-11-24 14:03:46 +03:00 committed by GitHub
parent ff85502a51
commit 0f88ca9412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 52 additions and 34 deletions

View File

@ -19,3 +19,15 @@ jobs:
run: npm t
- name: Run lint
run: npm run lint
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17
id: go
- name: Check out code
uses: actions/checkout@v2
- name: Run check (sanity only)
run: go run ./cmd/main.go --config=./.github/assets.config.yaml --script=sanity-check

View File

@ -1,24 +1,24 @@
# name: Fixes (sanity and consistency) - Dry run
# on:
# pull_request:
# branches: [master]
# jobs:
# fix-all-dryrun:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# - name: Install Dependencies
# run: npm ci
# - name: Run fix script
# run: npm run fix
# - name: Show fix result (diff); run 'npm run fix' locally
# run: |
# git status
# git diff
# - name: Run check
# run: npm run check
# - name: Run test
# run: npm t
name: Fixes (sanity and consistency) - Dry run
on:
pull_request:
branches: [master]
jobs:
fix-all-dryrun:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Dependencies
run: npm ci
- name: Run fix script
run: npm run fix
- name: Show fix result (diff); run 'npm run fix' locally
run: |
git status
git diff
- name: Run check
run: npm run check
- name: Run test
run: npm t

View File

@ -11,7 +11,7 @@ jobs:
pull_request_ci:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.17

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

View File

@ -2,6 +2,7 @@ package main
import (
"flag"
"os"
log "github.com/sirupsen/logrus"
@ -54,7 +55,12 @@ func main() {
"warnings": report.Warnings,
"fixed": report.Fixed,
}).Info(key)
if report.Errors > 0 {
os.Exit(1)
}
}
}
func setup() {

2
go.mod
View File

@ -4,7 +4,7 @@ go 1.17
require (
github.com/sirupsen/logrus v1.8.1
github.com/trustwallet/assets-go-libs v0.0.4
github.com/trustwallet/assets-go-libs v0.0.6
)
require (

16
go.sum
View File

@ -270,14 +270,14 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/trustwallet/assets-go-libs v0.0.3 h1:cWldvxbxqma3Jel5eddx06UwLVrbA+pDcT5rSBV8faA=
github.com/trustwallet/assets-go-libs v0.0.3/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/assets-go-libs v0.0.4-0.20211123131336-7a728bd0a73b h1:ONRJPDAbYBtYRuMk+g4cHWylS2PaATi4BQLQz6vkhN0=
github.com/trustwallet/assets-go-libs v0.0.4-0.20211123131336-7a728bd0a73b/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/assets-go-libs v0.0.4-0.20211123131913-19f758c9d03d h1:jKbJVfGIV6p1jBV6XQT6WKOF0tQPJAMddaUVQnp2xLM=
github.com/trustwallet/assets-go-libs v0.0.4-0.20211123131913-19f758c9d03d/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/assets-go-libs v0.0.4 h1:ElrlzLnB7n14463C65txV9ulQE3UWHnJtRoXRDQzDZU=
github.com/trustwallet/assets-go-libs v0.0.4/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/assets-go-libs v0.0.5-0.20211124103904-2d26b1ec5659 h1:+p+K+/tEnzPE+BTsC32j+F0u00Do9apcmVQlXevpqoM=
github.com/trustwallet/assets-go-libs v0.0.5-0.20211124103904-2d26b1ec5659/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/assets-go-libs v0.0.5 h1:rMaefTVSPT+hIuWFCxjD7PuW1CVJBtXw3bVyeWpmQb0=
github.com/trustwallet/assets-go-libs v0.0.5/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/assets-go-libs v0.0.6-0.20211124104413-520938a5b242 h1:7iVnHFNYSjtBPIj91ecOhTA53q5CMugNcD45+5tReww=
github.com/trustwallet/assets-go-libs v0.0.6-0.20211124104413-520938a5b242/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/assets-go-libs v0.0.6 h1:a0hJXemtyya4do32CTGHHJZDVHSR9ql+P7HpLilo0A0=
github.com/trustwallet/assets-go-libs v0.0.6/go.mod h1:0nQmM5unJu0GuWSFJrWgSyOi2uUGnYmjQ53SkKe7/qI=
github.com/trustwallet/go-libs v0.2.17 h1:l2zr5Ow19GTPnoWbhjExAhTbz7xLcYPXBa10EIgItjI=
github.com/trustwallet/go-libs v0.2.17/go.mod h1:gBDrDkN5wOY+8kwlU6pnv3l/seGJy2qH1OpTKe7NnXA=
github.com/trustwallet/go-primitives v0.0.11 h1:uVjm1IssSrur5MjnSbl+LerljnaU8pvgoBxq7krjNvI=