Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #517 from lochjin/0.10-dev
Browse files Browse the repository at this point in the history
DeploymentError and ci.sh
  • Loading branch information
dindinw committed Jul 13, 2021
2 parents e691d7a + 68fbc3d commit 497fc2f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 14 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/go.yml
@@ -0,0 +1,37 @@
name: GoTest

on:
push:
branches: [ master,0.10-dev ]
pull_request:
branches: [ master,0.10-dev ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16

- name: linter
run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0

- name: Build
run: make qitmeer

- name: Test
run: |
PATH=$PATH:$(pwd)/build/bin
go test -v ./...
- name: Run ci.sh
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
run: ./ci.sh
4 changes: 3 additions & 1 deletion README.md
@@ -1,6 +1,8 @@
# Qitmeer

[![Build Status](https://travis-ci.com/Qitmeer/qitmeer.svg?token=DzCFNC6nhEqPc89sq1nd&branch=master)](https://travis-ci.com/Qitmeer/qitmeer) [![Go Report Card](https://goreportcard.com/badge/github.com/Qitmeer/qitmeer)](https://goreportcard.com/report/github.com/Qitmeer/qitmeer)
[![Build Status](https://github.com/Qitmeer/qitmeer/workflows/CodeQL/badge.svg?branch=0.10-dev)](https://github.com/Qitmeer/qitmeer/actions/workflows/codeql-analysis.yml)
[![Build Status](https://github.com/Qitmeer/qitmeer/workflows/GoTest/badge.svg?branch=0.10-dev)](https://github.com/Qitmeer/qitmeer/actions/workflows/go.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/Qitmeer/qitmeer)](https://goreportcard.com/report/github.com/Qitmeer/qitmeer)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FQitmeer%2Fqitmeer.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FQitmeer%2Fqitmeer?ref=badge_shield)

The guardian of trust. The core backend of the qitmeer network.
Expand Down
13 changes: 3 additions & 10 deletions ci.sh
Expand Up @@ -4,7 +4,7 @@ set -ex
export GO111MODULE=on
#go mod init qitmeer
go mod tidy
export PATH=$PATH:$(pwd)/build/bin
#export PATH=$PATH:$(pwd)/build/bin

if [ ! -x "$(type -p golangci-lint)" ]; then
exit 1
Expand All @@ -13,15 +13,8 @@ fi
golangci-lint --version
golangci-lint run -v --deadline=2m --disable-all --enable=govet --tests=false ./...

make qitmeer

linter_targets=$(go list ./...) && \
go test $linter_targets

if [[ $TRAVIS_PULL_REQUEST != 'false' || $TRAVIS_REPO_SLUG != 'Qitmeer/qitmeer' || $TRAVIS_BRANCH != 'master' ]];
then
exit 0
fi
exit 0
# After the account and password are set, we can open it

project_name="qitmeer"
image_name="qitmeer/qitmeerd"
Expand Down
6 changes: 3 additions & 3 deletions core/blockchain/error.go
Expand Up @@ -22,12 +22,12 @@ func (e HashError) Error() string {

// DeploymentError identifies an error that indicates a deployment ID was
// specified that does not exist.
type DeploymentError string
type DeploymentError uint32

// Error returns the assertion error as a human-readable string and satisfies
// the error interface.
func (e DeploymentError) Error() string {
return fmt.Sprintf("deployment ID %v does not exist", string(e))
return fmt.Sprintf("deployment ID %v does not exist", uint32(e))
}

// AssertError identifies an error that indicates an internal code consistency
Expand Down Expand Up @@ -406,7 +406,7 @@ var errorCodeStrings = map[ErrorCode]string{
//cuckoo,begin
ErrBadCuckooNonces: "ErrBadCuckooNonces",
ErrInValidPowType: "ErrInValidPowType",
ErrInvalidPow: "ErrInvalidPow",
ErrInvalidPow: "ErrInvalidPow",

ErrNoBlueCoinbase: "ErrNoBlueCoinbase",
ErrNoViewpoint: "ErrNoViewpoint",
Expand Down

0 comments on commit 497fc2f

Please sign in to comment.