From cd233610a134a12410cb50849a54dfa1b8d36379 Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 10 Apr 2024 15:12:53 +0800 Subject: [PATCH 01/10] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a4b2d04..9c023914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,3 +112,4 @@ * 使用 untrust 接口推送消息 [[#306](https://github.com/ipfs-force-community/sophon-messager/pull/306)] * 按从小到大查询 unchain 消息 [[#307](https://github.com/ipfs-force-community/sophon-messager/pull/307)] * 移除测试中的重复代码 [[#308](https://github.com/ipfs-force-community/sophon-messager/pull/308)] + From 2b725ed6b50668a58182fc820af64444c86ae9d1 Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 10 Apr 2024 15:32:31 +0800 Subject: [PATCH 02/10] Update .golangci.yml --- .golangci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index cc31fd3b..ed8040b4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,7 +5,6 @@ linters: - govet - misspell - goconst - - revive - errcheck - unconvert - staticcheck From 0177f30d8762964cf98261ca89a429b970e987c2 Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 10 Apr 2024 16:26:08 +0800 Subject: [PATCH 03/10] Update go.yml --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c4a4a23f..4fb9008d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,7 +11,7 @@ on: jobs: check: - uses: filecoin-project/venus/.github/workflows/common_go.yml@master + uses: filecoin-project/venus/.github/workflows/common_go.yml@chore/ci with: has_ffi: false test_timeout: 20 From c00085fc9925f8cb44bc3b3f990769dc29d925cd Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 10 Apr 2024 17:27:07 +0800 Subject: [PATCH 04/10] Create common.yml --- .github/workflows/common.yml | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/common.yml diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml new file mode 100644 index 00000000..892d2d5c --- /dev/null +++ b/.github/workflows/common.yml @@ -0,0 +1,54 @@ +name: build and golangci-lint and test + +on: + push: + branches: + - master + pull_request: + branches: + - '**' + +jobs: + check: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.21' + cache: true + + - name: install default deps + run: sudo apt-get -o Acquire::Retries=3 update && sudo apt-get -o Acquire::Retries=3 install make ftp git bzr curl wget -y + + - name: Build + env: + GOPROXY: "https://proxy.golang.org,direct" + GO111MODULE: "on" + run: | + make + + - name: Lint + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2 + golangci-lint run --timeout 10m + + - name: Detect changes + run: | + go mod tidy + git status --porcelain + test -z "$(git status --porcelain)" + + - name: Run coverage + run: | + go test -coverpkg=./... -race -coverprofile=coverage.txt -covermode=atomic ./... -v --timeout 10m + + - name: Upload + uses: codecov/codecov-action@v2 + with: + files: ./coverage.txt + flags: unittests + name: venus-messager + verbose: true From 729e6298faaf80f8d2a8b1b5b0bdcd3232feefb5 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 11 Apr 2024 13:14:27 +0800 Subject: [PATCH 05/10] Update common.yml --- .github/workflows/common.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 892d2d5c..c668a928 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -48,6 +48,7 @@ jobs: - name: Upload uses: codecov/codecov-action@v2 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.txt flags: unittests name: venus-messager From 8f083f08adbce6e6eee4773cc63e981eccf1e726 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 11 Apr 2024 13:43:57 +0800 Subject: [PATCH 06/10] Update common.yml --- .github/workflows/common.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index c668a928..06e362d0 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -52,4 +52,5 @@ jobs: files: ./coverage.txt flags: unittests name: venus-messager + fail_ci_if_error: true verbose: true From 3fb14312d11a58e03e0414a3bf3bf6b92ba5daae Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 11 Apr 2024 13:50:51 +0800 Subject: [PATCH 07/10] Update go.yml --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 4fb9008d..c4a4a23f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,7 +11,7 @@ on: jobs: check: - uses: filecoin-project/venus/.github/workflows/common_go.yml@chore/ci + uses: filecoin-project/venus/.github/workflows/common_go.yml@master with: has_ffi: false test_timeout: 20 From 6aa53620d60b797c99d022088fd3cedf3a879fd8 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 11 Apr 2024 14:09:59 +0800 Subject: [PATCH 08/10] Update go.yml --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c4a4a23f..4fb9008d 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,7 +11,7 @@ on: jobs: check: - uses: filecoin-project/venus/.github/workflows/common_go.yml@master + uses: filecoin-project/venus/.github/workflows/common_go.yml@chore/ci with: has_ffi: false test_timeout: 20 From 2aad6ee618459f7561a2c7a722556a81477d4e35 Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 11 Apr 2024 14:24:50 +0800 Subject: [PATCH 09/10] Create c.yml --- .github/workflows/c.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/c.yml diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml new file mode 100644 index 00000000..32d4b854 --- /dev/null +++ b/.github/workflows/c.yml @@ -0,0 +1,30 @@ +name: build and test + +on: + push: + branches: + - master + pull_request: + branches: + - '**' + +jobs: + check: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.21' + cache: true + + - name: Upload + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + name: venus-messager + fail_ci_if_error: true + verbose: true From 156b89501c73dba4ab4be7d7c4cd92459123cd8e Mon Sep 17 00:00:00 2001 From: tom Date: Thu, 11 Apr 2024 15:21:56 +0800 Subject: [PATCH 10/10] Update c.yml --- .github/workflows/c.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml index 32d4b854..6ece9027 100644 --- a/.github/workflows/c.yml +++ b/.github/workflows/c.yml @@ -20,11 +20,16 @@ jobs: go-version: '1.21' cache: true + - name: file + run: | + touch ./coverage.txt + - name: Upload uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} flags: unittests name: venus-messager + files: ./coverage.txt fail_ci_if_error: true verbose: true