Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove test duplicate package #5445

Merged
merged 1 commit into from
Nov 3, 2022
Merged
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
7 changes: 3 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,20 @@ jobs:
./gengen --keypath ./fixtures/live --out-car ./fixtures/live/genesis.car --out-json ./fixtures/live/gen.json --config ./fixtures/setup.json
./gengen --keypath ./fixtures/test --out-car ./fixtures/test/genesis.car --out-json ./fixtures/test/gen.json --config ./fixtures/setup.json

- name: Integration Test
- name: Venus Shared Test
run: go test -coverpkg=./... -coverprofile=coverage_venus_shared.txt -covermode=atomic -timeout=30m -parallel=4 -v ./venus-shared/...

- name: Unit Test
run: go test -coverpkg=./... -coverprofile=coverage_unit.txt -covermode=atomic -timeout=30m -parallel=4 -v ./... -integration=false -unit=true
run: go test -coverpkg=./... -coverprofile=coverage_unit.txt -covermode=atomic -timeout=30m -parallel=4 -v $(go list ./... | grep -v /venus-shared/) -integration=false -unit=true

- name: Integration Test
run: go test -coverpkg=./... -coverprofile=coverage_integration.txt -covermode=atomic -timeout=30m -parallel=4 -v ./... -integration=true -unit=false
run: go test -coverpkg=./... -coverprofile=coverage_integration.txt -covermode=atomic -timeout=30m -parallel=4 -v $(go list ./... | grep -v /venus-shared/) -integration=true -unit=false

- name: Upload
uses: codecov/codecov-action@v2
with:
token:
files: ./coverage_unit.txt,./coverage_integration.txt,./coverage_venus_shared.txt
flags: unittests,integration
name: venus
fail_ci_if_error: true
verbose: true
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ test:test-venus-shared
go build -o gengen ./tools/gengen
./gengen --keypath ./fixtures/live --out-car ./fixtures/live/genesis.car --out-json ./fixtures/live/gen.json --config ./fixtures/setup.json
./gengen --keypath ./fixtures/test --out-car ./fixtures/test/genesis.car --out-json ./fixtures/test/gen.json --config ./fixtures/setup.json
go test $(go list ./... | grep -v /venus-shared/) -unit=false
go test $$(go list ./... | grep -v /venus-shared/) -timeout=30m -v -integration=true -unit=false
go test $$(go list ./... | grep -v /venus-shared/) -timeout=30m -v -integration=false -unit=true

lint: $(BUILD_DEPS)
golangci-lint run
Expand Down
10 changes: 6 additions & 4 deletions tools/gengen/util/gengen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"os"
"testing"

"github.com/filecoin-project/go-state-types/builtin"

"github.com/filecoin-project/go-state-types/abi"
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
ds "github.com/ipfs/go-datastore"
blockstore "github.com/ipfs/go-ipfs-blockstore"

Expand Down Expand Up @@ -72,9 +73,10 @@ func TestGenGenLoading(t *testing.T) {
o := td.Run("state", "list-actor").AssertSuccess()

stdout := o.ReadStdout()
assert.Contains(t, stdout, builtin2.StoragePowerActorCodeID.String())
assert.Contains(t, stdout, builtin2.StorageMarketActorCodeID.String())
assert.Contains(t, stdout, builtin2.InitActorCodeID.String())
//address won't change
assert.Contains(t, stdout, builtin.StoragePowerActorAddr.String())
assert.Contains(t, stdout, builtin.StorageMarketActorAddr.String())
assert.Contains(t, stdout, builtin.InitActorAddr.String())
}

func TestGenGenDeterministic(t *testing.T) {
Expand Down