Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sesheffield committed Jul 25, 2024
1 parent 3c92d96 commit d74e325
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,41 @@ jobs:
working-directory: ${{ github.workspace }}
if: |
contains(steps.changed-files.outputs.all_changed_files, '.go')
golang-test:
name: go test
runs-on: ubuntu-latest
if: |
contains(needs.changed_files.outputs.changed_files, '.go') ||
contains(needs.changed_files.outputs.changed_files, 'go.sum') ||
(
contains(needs.changed_files.outputs.changed_files, '.yml') ||
contains(needs.changed_files.outputs.changed_files, '.yaml')
)
&&
(
contains(needs.changed_files.outputs.changed_files, 'app') ||
contains(needs.changed_files.outputs.changed_files, 'client') ||
contains(needs.changed_files.outputs.changed_files, 'cmd') ||
contains(needs.changed_files.outputs.changed_files, 'migrate') ||
contains(needs.changed_files.outputs.changed_files, 'tests') ||
contains(needs.changed_files.outputs.changed_files, 'x')
)
env:
COVERAGE_DIR: out/coverage/unit/go
COVERAGE_PATH: out/coverage/unit/go/cover.out
FORMATTED_REPORT: out/coverage/unit/go/go-unit-cover.out
HTML_REPORT: out/coverage/unit/go/go-unit-cover.html
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup_go
- name: Go Test
run: |
mkdir -p ${{ env.COVERAGE_DIR }}
readarray -t test_dirs < <(find * -name "*_test.go" -exec dirname {} \; | sort | uniq | grep -v -e '^\.$')
half_nproc=$(( $(nproc --all) / 2 ))
printf '%s\0' "${test_dirs[@]}" | xargs -0 -P $half_nproc -n 1 -I {} go test "./{}" -race
# - name: Load Version
# id: load-version
# run: |
Expand Down
2 changes: 1 addition & 1 deletion app/params/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type EncodingConfig struct {
Amino *codec.LegacyAmino
}

// MakeEncodingConfigBlah creates a new EncodingConfig.
// MakeEncodingConfig creates a new EncodingConfig.
func MakeEncodingConfig() EncodingConfig {
amino := codec.NewLegacyAmino()
interfaceRegistry := types.NewInterfaceRegistry()
Expand Down
9 changes: 4 additions & 5 deletions app/params/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ const (

// Default simulation operation weights for messages and gov proposals
const (
DefaultWeightMsgPlaceBid int = 20
DefaultWeightMsgCreateAtomicSwap int = 20
DefaultWeightMsgUpdatePrices int = 20
DefaultWeightMsgCdp int = 20

DefaultWeightMsgPlaceBid int = 20
DefaultWeightMsgCreateAtomicSwap int = 20
DefaultWeightMsgUpdatePrices int = 20
DefaultWeightMsgCdp int = 20
DefaultWeightMsgClaimReward int = 20
DefaultWeightMsgDeposit int = 20
DefaultWeightMsgWithdraw int = 20
Expand Down

0 comments on commit d74e325

Please sign in to comment.