Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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: 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
56 changes: 56 additions & 0 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt
flags: unittests
name: venus-messager
fail_ci_if_error: true
verbose: true
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ linters:
- govet
- misspell
- goconst
- revive
- errcheck
- unconvert
- staticcheck
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)]