ci: test paths directive (#6251)
* test paths directive * change proto files * test paths on code coverage * have parts of ci only run when go files are touched * add readme badge * bring back green checks * remove paths * green check linting * add tests no run
This commit is contained in:
parent
e0fa14c0e1
commit
d7677e0871
13
.github/workflows/lint.yml
vendored
13
.github/workflows/lint.yml
vendored
@ -1,14 +1,25 @@
|
||||
name: Lint
|
||||
on: [pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
golangci:
|
||||
name: golangci-lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
- uses: golangci/golangci-lint-action@master
|
||||
with:
|
||||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||
version: v1.26
|
||||
args: --timeout 10m
|
||||
github-token: ${{ secrets.github_token }}
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
19
.github/workflows/proto.yml
vendored
19
.github/workflows/proto.yml
vendored
@ -1,29 +1,18 @@
|
||||
name: Protobuf
|
||||
on: [pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.proto'
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
id: git_diff
|
||||
with:
|
||||
SUFFIX_FILTER: .proto
|
||||
SET_ENV_NAME_INSERTIONS: 1
|
||||
SET_ENV_NAME_LINES: 1
|
||||
- name: lint
|
||||
run: make proto-lint-docker
|
||||
if: "env.GIT_DIFF != ''"
|
||||
breakage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
id: git_diff
|
||||
with:
|
||||
SUFFIX_FILTER: .proto
|
||||
SET_ENV_NAME_INSERTIONS: 1
|
||||
SET_ENV_NAME_LINES: 1
|
||||
- name: check-breakage
|
||||
run: make proto-check-breaking-docker
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
3
.github/workflows/sims.yml
vendored
3
.github/workflows/sims.yml
vendored
@ -1,5 +1,6 @@
|
||||
name: Sims
|
||||
on: [pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
jobs:
|
||||
cleanup-runs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@ -29,7 +29,6 @@ jobs:
|
||||
run: |
|
||||
make build
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
- name: test & coverage report creation
|
||||
run: |
|
||||
go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
|
||||
@ -50,10 +49,18 @@ jobs:
|
||||
file: ./coverage.txt # optional
|
||||
fail_ci_if_error: true
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
integration-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
id: git_diff
|
||||
with:
|
||||
SUFFIX_FILTER: |
|
||||
.go
|
||||
.mod
|
||||
.sum
|
||||
- name: build-sim
|
||||
run: |
|
||||
make build-sim
|
||||
@ -61,3 +68,4 @@ jobs:
|
||||
- name: cli-test
|
||||
run: |
|
||||
make test-integration
|
||||
if: "env.GIT_DIFF != ''"
|
||||
|
||||
@ -8,10 +8,10 @@ parent:
|
||||

|
||||
|
||||
[](https://github.com/cosmos/cosmos-sdk/releases/latest)
|
||||
[](https://circleci.com/gh/cosmos/cosmos-sdk/tree/master)
|
||||

|
||||
[](https://codecov.io/gh/cosmos/cosmos-sdk)
|
||||
[](https://goreportcard.com/report/github.com/cosmos/cosmos-sdk)
|
||||

|
||||
[](https://github.com/cosmos/cosmos-sdk/blob/master/LICENSE)
|
||||
[](https://github.com/cosmos/cosmos-sdk)
|
||||
[](https://godoc.org/github.com/cosmos/cosmos-sdk)
|
||||
|
||||
@ -10,141 +10,141 @@ option go_package = "github.com/cosmos/cosmos-sdk/tx/types";
|
||||
|
||||
// Tx is the standard type used for broadcasting transactions
|
||||
message Tx {
|
||||
// body is the processable content of the transaction
|
||||
TxBody body = 1;
|
||||
// body is the processable content of the transaction
|
||||
TxBody body = 1;
|
||||
|
||||
// auth_info is the authorization related content of the transaction, specifically
|
||||
// signers, signer modes and fee
|
||||
AuthInfo auth_info = 2;
|
||||
// auth_info is the authorization related content of the transaction, specifically
|
||||
// signers, signer modes and fee
|
||||
AuthInfo auth_info = 2;
|
||||
|
||||
// signatures are the raw binary signatures of signers specified by body and auth_info
|
||||
repeated bytes signatures = 3;
|
||||
// signatures are the raw binary signatures of signers specified by body and auth_info
|
||||
repeated bytes signatures = 3;
|
||||
}
|
||||
|
||||
// SignDoc is the standard type used for signing transaction in SIGN_MODE_DIRECT
|
||||
message SignDoc {
|
||||
// body is the TxBody from Tx
|
||||
TxBody body = 1;
|
||||
// body is the TxBody from Tx
|
||||
TxBody body = 1;
|
||||
|
||||
// auth_info is the AuthInfo from Tx
|
||||
AuthInfo auth_info = 2;
|
||||
// auth_info is the AuthInfo from Tx
|
||||
AuthInfo auth_info = 2;
|
||||
|
||||
// chain_id is the unique identifier of the chain this transaction targets.
|
||||
// It prevents signed transactions from being used on another chain by an
|
||||
// attacker
|
||||
string chain_id = 3;
|
||||
// chain_id is the unique identifier of the chain this transaction targets.
|
||||
// It prevents signed transactions from being used on another chain by an
|
||||
// attacker
|
||||
string chain_id = 3;
|
||||
|
||||
// account_number is the account number of the account in state
|
||||
uint64 account_number = 4;
|
||||
// account_number is the account number of the account in state
|
||||
uint64 account_number = 4;
|
||||
|
||||
// account_sequence starts at 1 rather than 0 to avoid the case where
|
||||
// the default 0 value must be omitted in protobuf serialization
|
||||
uint64 account_sequence = 5;
|
||||
// account_sequence starts at 1 rather than 0 to avoid the case where
|
||||
// the default 0 value must be omitted in protobuf serialization
|
||||
uint64 account_sequence = 5;
|
||||
}
|
||||
|
||||
// TxBody is the body of a transaction that all signers sign over
|
||||
message TxBody {
|
||||
// messages are the processable content of the transaction
|
||||
repeated google.protobuf.Any messages = 1;
|
||||
// messages are the processable content of the transaction
|
||||
repeated google.protobuf.Any messages = 1;
|
||||
|
||||
// memo is any arbitrary memo to be added to the transaction
|
||||
string memo = 2;
|
||||
// memo is any arbitrary memo to be added to the transaction
|
||||
string memo = 2;
|
||||
|
||||
// timeout is the block height after which this transaction will not
|
||||
// be processed by the chain
|
||||
int64 timeout_height = 3;
|
||||
// timeout is the block height after which this transaction will not
|
||||
// be processed by the chain
|
||||
int64 timeout_height = 3;
|
||||
|
||||
// extension_options are arbitrary options that can be added by chains
|
||||
// when the default options are not sufficient. If any of these are present
|
||||
// and can't be handled, the transaction will be rejected
|
||||
repeated google.protobuf.Any extension_options = 1023;
|
||||
// extension_options are arbitrary options that can be added by chains
|
||||
// when the default options are not sufficient. If any of these are present
|
||||
// and can't be handled, the transaction will be rejected
|
||||
repeated google.protobuf.Any extension_options = 1023;
|
||||
|
||||
// extension_options are arbitrary options that can be added by chains
|
||||
// when the default options are not sufficient. If any of these are present
|
||||
// and can't be handled, they will be ignored
|
||||
repeated google.protobuf.Any non_critical_extension_options = 2047;
|
||||
// extension_options are arbitrary options that can be added by chains
|
||||
// when the default options are not sufficient. If any of these are present
|
||||
// and can't be handled, they will be ignored
|
||||
repeated google.protobuf.Any non_critical_extension_options = 2047;
|
||||
}
|
||||
|
||||
// AuthInfo describes the fee and signer modes that are used to sign a transaction
|
||||
message AuthInfo {
|
||||
// signer_infos is the list of signer infos which corresponds with
|
||||
// Tx.signatures and expected signers derived from TxBody.messages. All signers
|
||||
// are expected to occur in the same order in each of these locations
|
||||
repeated SignerInfo signer_infos = 1;
|
||||
// signer_infos is the list of signer infos which corresponds with
|
||||
// Tx.signatures and expected signers derived from TxBody.messages. All signers
|
||||
// are expected to occur in the same order in each of these locations
|
||||
repeated SignerInfo signer_infos = 1;
|
||||
|
||||
// Fee is the fee and gas limit for the transaction. The first signer is the
|
||||
// primary signer and the one which pays the fee
|
||||
Fee fee = 2;
|
||||
// Fee is the fee and gas limit for the transaction. The first signer is the
|
||||
// primary signer and the one which pays the fee
|
||||
Fee fee = 2;
|
||||
}
|
||||
|
||||
// SignerInfo describes the public key and signing mode of a single top-level signer
|
||||
message SignerInfo {
|
||||
// public_key is the public key of the signer. It is optional for accounts
|
||||
// that already exist in state
|
||||
google.protobuf.Any public_key = 1;
|
||||
// public_key is the public key of the signer. It is optional for accounts
|
||||
// that already exist in state
|
||||
google.protobuf.Any public_key = 1;
|
||||
|
||||
// mode_info describes the signing mode of the signer and is a nested
|
||||
// structure to support nested multisig pubkey's
|
||||
ModeInfo mode_info = 2;
|
||||
// mode_info describes the signing mode of the signer and is a nested
|
||||
// structure to support nested multisig pubkey's
|
||||
ModeInfo mode_info = 2;
|
||||
}
|
||||
|
||||
// ModeInfo describes the signing mode of a single or nested multisig signer
|
||||
message ModeInfo {
|
||||
// sum is the oneof that specifies whether this represents a single or nested
|
||||
// multisig signer
|
||||
oneof sum {
|
||||
// single represents a single signer
|
||||
Single single = 1;
|
||||
// sum is the oneof that specifies whether this represents a single or nested
|
||||
// multisig signer
|
||||
oneof sum {
|
||||
// single represents a single signer
|
||||
Single single = 1;
|
||||
|
||||
// multi represents a nested multisig signer
|
||||
Multi multi = 2;
|
||||
}
|
||||
// multi represents a nested multisig signer
|
||||
Multi multi = 2;
|
||||
}
|
||||
|
||||
// Single is the mode info for a single signer. It is structured as a message
|
||||
// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future
|
||||
message Single {
|
||||
// mode is the signing mode of the single signer
|
||||
SignMode mode = 1;
|
||||
}
|
||||
// Single is the mode info for a single signer. It is structured as a message
|
||||
// to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the future
|
||||
message Single {
|
||||
// mode is the signing mode of the single signer
|
||||
SignMode mode = 1;
|
||||
}
|
||||
|
||||
// Multi is the mode info for a multisig public key
|
||||
message Multi {
|
||||
// bitarray specifies which keys within the multisig are signing
|
||||
cosmos_sdk.crypto.v1.CompactBitArray bitarray = 1;
|
||||
// Multi is the mode info for a multisig public key
|
||||
message Multi {
|
||||
// bitarray specifies which keys within the multisig are signing
|
||||
cosmos_sdk.crypto.v1.CompactBitArray bitarray = 1;
|
||||
|
||||
// mode_infos is the corresponding modes of the signers of the multisig
|
||||
// which could include nested multisig public keys
|
||||
repeated ModeInfo mode_infos = 2;
|
||||
}
|
||||
// mode_infos is the corresponding modes of the signers of the multisig
|
||||
// which could include nested multisig public keys
|
||||
repeated ModeInfo mode_infos = 2;
|
||||
}
|
||||
}
|
||||
|
||||
// SignMode represents a signing mode with its own security guarantees
|
||||
enum SignMode {
|
||||
// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected
|
||||
SIGN_MODE_UNSPECIFIED = 0;
|
||||
// SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be rejected
|
||||
SIGN_MODE_UNSPECIFIED = 0;
|
||||
|
||||
// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified
|
||||
// with raw bytes from Tx
|
||||
SIGN_MODE_DIRECT = 1;
|
||||
// SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is verified
|
||||
// with raw bytes from Tx
|
||||
SIGN_MODE_DIRECT = 1;
|
||||
|
||||
// SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable
|
||||
// textual representation on top of the binary representation from SIGN_MODE_DIRECT
|
||||
SIGN_MODE_TEXTUAL = 2;
|
||||
// SIGN_MODE_TEXTUAL is a future signing mode that will verify some human-readable
|
||||
// textual representation on top of the binary representation from SIGN_MODE_DIRECT
|
||||
SIGN_MODE_TEXTUAL = 2;
|
||||
|
||||
// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
|
||||
// Amino JSON and will be removed in the future
|
||||
SIGN_MODE_LEGACY_AMINO_JSON = 127;
|
||||
// SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses
|
||||
// Amino JSON and will be removed in the future
|
||||
SIGN_MODE_LEGACY_AMINO_JSON = 127;
|
||||
}
|
||||
|
||||
// Fee includes the amount of coins paid in fees and the maximum
|
||||
// gas to be used by the transaction. The ratio yields an effective "gasprice",
|
||||
// which must be above some miminum to be accepted into the mempool.
|
||||
message Fee {
|
||||
// amount is the amount of coins to be paid as a fee
|
||||
repeated cosmos_sdk.v1.Coin amount = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
// amount is the amount of coins to be paid as a fee
|
||||
repeated cosmos_sdk.v1.Coin amount = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"];
|
||||
|
||||
// gas_limit is the maximum gas that can be used in transaction processing
|
||||
// before an out of gas error occurs
|
||||
uint64 gas_limit = 2;
|
||||
// gas_limit is the maximum gas that can be used in transaction processing
|
||||
// before an out of gas error occurs
|
||||
uint64 gas_limit = 2;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user