Skip to content

Commit

Permalink
fix: failing tests (#694)
Browse files Browse the repository at this point in the history
* fix: release permission check

* try fix go releaser

* touch

* touch

* release check

* try fix

* release check

* fix swagger

* fix swagger gen

* fix

* release check

* update goreleaser config

* revert changes

* fix: ante handler ibc fix

* fix tests

* remove test.sh

* fix: integration test check

* keys check

* try fix start script

* fix jq

* remove logs

* fix import keys

* revert

* fix: tx msgServer fixes

* fix: keys check

* fix import keys

* revert

* fix tests

* fix panic

* fix build

* add wait timer

* reduce timer

* increase time

* fix: upgrade test fixes for old binary

* fix: old binary setup.sh

* fix: localnet dir path fix

* fix: upgrade test fix

* add missing post hand;er

* fix tests

* add timer

* add post handler

* add handler

* fix test

* add timer

* try increasing the time

* decrease the timer

* fix tests

* fix lint

* fix lint

* fix lint

* fix tests

* fix

* increase time

* fix: upgrade test moduleVersion fix

* fix: upgrade test fix

* fix: test docker ps

* fix: checking docker before post test

* fix: parse fix

* fix: docker check

* fix: docker keys check

* revert: entrypoint revert

* fix: docker ps check with logs

* fix: upgrade handler with consensus, crisis

* test: docker ps logs check

* test: SendEnabled param fix

* lint: gofumpt fix

* chore: consensus module included

* chore: bank subspace fix

* lint: golang ci fix

* test: feeparam register fix

* fix: bankType param fix

* ci: Update CI workflows (#695)

* update package lock

* Update .releaserc.json

* Bump setup-go

* Update dependabot.yml

* Update pull-request.yml

* Update release workflows

* Uploaded download/upload artifact

* Ignore twitter links

* archives.rlcp is deprecated

* Standardise quotes

* ci: Resolved Integration, Upgrade test suites (#696)

* Debug

* Switch to param key table

* Skip deprecation staticcheck

* Added crisis param key table

* Added distribution parameter key table

* Added gov parameter key table

* Added mint parameter key table

* Added slashing parameter key table

* Added staking parameter key table

* Removed exclusion

* Added auth parameter key table

* Added consensus module expected definition

* Added legacy gov router registration

* Added artificial idle time against sequence mismatch

* Additional idle time

* Run sequential

* Switch to utilise other op acc

* Additional overhead

* Re-order against sequence mismatch

* Removed idle time

* Added polling for optimistic tx submission

* Additional overhead

---------

Co-authored-by: deepan95dev <[email protected]>
Co-authored-by: akhilkumarpilli <[email protected]>
Co-authored-by: Ankur Banerjee <[email protected]>
Co-authored-by: Tasos Derisiotis <[email protected]>
  • Loading branch information
5 people authored Feb 27, 2024
1 parent c7c4554 commit 357ba2a
Show file tree
Hide file tree
Showing 70 changed files with 1,130 additions and 2,687 deletions.
13 changes: 10 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,27 @@

version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
target-branch: "develop"
directory: "/"
schedule:
interval: "weekly"
interval: "weekly"
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-patch

# Maintain dependencies for NPM
- package-ecosystem: "npm"
target-branch: "develop"
directory: "/"
schedule:
interval: "weekly"
interval: "weekly"
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-patch

# Maintain dependencies for Docker
- package-ecosystem: "docker"
Expand Down
9 changes: 6 additions & 3 deletions .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ run:


linters:
disable-all: true
enable:
- bodyclose
- depguard
- depguard
- dogsled
- errcheck
- exportloopref
Expand All @@ -28,7 +26,12 @@ linters:
- typecheck
- unconvert
- unused


issues:
exclude-rules:
- text: "ST1003:"
linters:
- stylecheck

linters-settings:
dogsled:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: true
Expand All @@ -32,7 +32,7 @@ jobs:
args: build --clean --snapshot --single-target

- name: Store artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cheqd-noded
path: dist/linux-amd64_linux_amd64_v1/cheqd-noded
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
cache-to: type=gha,mode=min

- name: Upload Docker build image
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cheqd-node-build.tar
path: /tmp/cheqd-node-build.tar
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
languages: 'go'
queries: security-and-quality

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: 1.18

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: false # temporarily off, as golangci-lint doesn't align 100% with cached setup-go@v4, see: https://github.com/golangci/golangci-lint-action/issues/807
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: amannn/action-semantic-pull-request@v5.3.0
- uses: amannn/action-semantic-pull-request@v5.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ jobs:
persist-credentials: false

# Node.js setup is needed to run Semantic Release
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'

# Required for short-lived token provided to Semantic Release
- name: "Obtain Github App token"
id: app-token
uses: getsentry/action-github-app-token@v2.0.0
uses: getsentry/action-github-app-token@v3.0.0
with:
app_id: ${{ secrets.BOT_APP_ID }}
private_key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
fetch-depth: 0 # Required to fetch version
persist-credentials: false

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: true
Expand Down
49 changes: 27 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: true
Expand All @@ -93,7 +93,7 @@ jobs:
run: ginkgo -r --race --randomize-all --randomize-suites --keep-going --trace --junit-report report-unit.xml

- name: Upload unit tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report-unit.xml
path: report-unit.xml
Expand All @@ -106,7 +106,7 @@ jobs:
- uses: actions/checkout@v4

- name: Download binary artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download
with:
name: cheqd-noded
Expand All @@ -116,7 +116,7 @@ jobs:
run: sudo chmod +x ${{ env.RUNNER_BIN_DIR }}/cheqd-noded

- name: Download node Docker image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: cheqd-node-build.tar

Expand All @@ -139,7 +139,7 @@ jobs:
run: |
bash import-keys.sh
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: true
Expand All @@ -159,7 +159,7 @@ jobs:
run: docker compose --env-file build-latest.env logs --tail --follow

- name: Upload integration tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report-integration.xml
path: report-integration.xml
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
cache: true
Expand All @@ -199,7 +199,7 @@ jobs:
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest

- name: Download new version of the Docker image (build-latest)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: cheqd-node-build.tar

Expand All @@ -210,15 +210,15 @@ jobs:
- name: Setting up network with old binary inside (mainnet version)
working-directory: ./tests/upgrade/integration
run: |
bash scripts/setup.sh
bash scripts/old_binary_setup.sh
- name: Run pre-upgrade tests
working-directory: ./tests/upgrade/integration/v2
run: |
ginkgo -r --race --tags upgrade_integration --focus-file pre_test.go --keep-going --trace --junit-report ../../../../report-pre-upgrade.xml
- name: Upload pre-upgrade tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report-pre-upgrade.xml
path: report-pre-upgrade.xml
Expand All @@ -228,19 +228,24 @@ jobs:
run: |
bash scripts/upgrade.sh
- name: Verifying docker processes
working-directory: ./tests/upgrade/integration
run: |
docker ps -a
- name: Run post-upgrade tests
working-directory: ./tests/upgrade/integration/v2
run: |
ginkgo -r --race --tags upgrade_integration --focus-file post_test.go --keep-going --trace --junit-report ../../../../report-post-upgrade.xml
- name: Upload post-upgrade tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report-post-upgrade.xml
path: report-post-upgrade.xml

- name: Download binary artifact (build-latest)
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download
with:
name: cheqd-noded
Expand All @@ -255,7 +260,7 @@ jobs:
ginkgo -r --tags integration --race --randomize-suites --keep-going --trace --junit-report ../../report-upgraded-integration.xml
- name: Upload post-upgrade integration tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report-upgraded-integration.xml
path: report-upgraded-integration.xml
Expand All @@ -271,7 +276,7 @@ jobs:
ginkgo -r --race --tags upgrade_integration --focus-file param_change_proposal_test.go --keep-going --trace --junit-report ../../../../report-pricing-proposal.xml
- name: Upload pricing proposal tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report-pricing-proposal.xml
path: report-pricing-proposal.xml
Expand All @@ -282,7 +287,7 @@ jobs:
ginkgo -r --tags integration --race --randomize-suites --keep-going --trace --skip-file cli_diddoc_test.go --skip-file cli_diddoc_negative_test.go --skip-file cli_resource_test.go --skip-file cli_resource_negative_test.go --junit-report ../../report-pricing-change.xml
- name: Upload pricing change tests result
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: report-pricing-change.xml
path: report-pricing-change.xml
Expand All @@ -304,37 +309,37 @@ jobs:
- uses: actions/checkout@v4

- name: Download unit test
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: report-unit.xml

- name: Download integration test report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: report-integration.xml

- name: Download pre-upgrade test Report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: report-pre-upgrade.xml

- name: Download post-upgrade test Report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: report-post-upgrade.xml

- name: Download upgraded integration test Report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: report-upgraded-integration.xml

- name: Download pricing proposal test Report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: report-pricing-proposal.xml

- name: Download pricing change test Report
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: report-pricing-change.xml

Expand Down
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ builds:

archives:
- id: release-archives
rlcp: true
format: tar.gz
wrap_in_directory: false
name_template: "{{ .Binary }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
Expand Down
18 changes: 9 additions & 9 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
"branches": [
"main",
{
"name": "release/0.6.x",
"range": "0.6.x",
"channel": "0.6.x"
"name": "develop",
"channel": "beta",
"prerelease": true
},
{
"name": "release/1.x.x",
"range": "1.x.x",
"channel": "1.x.x"
"name": "release/1.x",
"range": "1.x",
"channel": "1.x"
},
{
"name": "develop",
"channel": "beta",
"prerelease": true
"name": "release/0.6.x",
"range": "0.6.x",
"channel": "0.6.x"
}
],
"tagFormat": "v${version}",
Expand Down
Loading

0 comments on commit 357ba2a

Please sign in to comment.