diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db8569fe..2e523a46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,28 @@ jobs: with: go-version: '1.17' - run: GOPROXY=direct,https://proxy.golang.org GOSUMDB=off GO111MODULE=on go install -mod=mod github.com/kisielk/errcheck; /home/runner/go/bin/errcheck -tags draft ./... + error_code_check: + name: Error code utility check + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@master + with: + fetch-depth: 1 + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: 1.17 + - run: | + errWillHave="level=error" + GOPROXY=https://proxy.golang.org,direct GOSUMDB=off GO111MODULE=on go install github.com/layer5io/meshkit/cmd/errorutil; + err=$(/home/runner/go/bin/errorutil -d . update --skip-dirs meshery -i ./helpers -o ./helpers); + echo "ERR: $err"; + if [[ $err == *"$errWillHave"* ]]; + then + echo "$err"; + return 1; + fi static_check: name: Static check runs-on: ubuntu-latest