-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update x/foundation to use Finschia/cosmos-sdk (#1198)
* Copy x/foundation * Update imports * Update logic * Add module proto * Wire x/foundation * Update tests * Update go.mod * Lint * Use Finschia/cometbft * Refactor address codec * Proto gen * Add x/foundation to pr labeler * Cover x/foundation * Add e2e tests * Update mocks * Gosec * Update CHANGELOG.md * Fix test workflow * Fix protobuf break checking workflow * Stop using interface for keeper * Remove GetSignBytes * ci: downgrade pr labeler to v4 because of broken version(v5 and above) * Remove legacy simapp * Update x/foundation/README.md Co-authored-by: Shogo Hyodo <[email protected]> * Remove testing legacy simapp * go mod tidy simapp --------- Co-authored-by: jaeseung.bae <[email protected]> Co-authored-by: Shogo Hyodo <[email protected]>
- Loading branch information
1 parent
742cd17
commit d9ebe72
Showing
92 changed files
with
37,814 additions
and
989 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,5 @@ | |
# - x/*/client/**/* | ||
# "Type: ADR": | ||
# - docs/architecture/**/* | ||
"C:x/foundation": | ||
- x/foundation/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,40 +113,41 @@ jobs: | |
# name: "${{ github.sha }}-integration-coverage" | ||
# path: ./tests/integration-profile.out | ||
|
||
# test-e2e: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-go@v4 | ||
# with: | ||
# go-version: "1.21" | ||
# check-latest: true | ||
# cache: true | ||
# cache-dependency-path: go.sum | ||
# - uses: technote-space/[email protected] | ||
# id: git_diff | ||
# with: | ||
# PATTERNS: | | ||
# **/*.go | ||
# go.mod | ||
# go.sum | ||
# **/go.mod | ||
# **/go.sum | ||
# **/Makefile | ||
# Makefile | ||
# - name: e2e tests | ||
# if: env.GIT_DIFF | ||
# run: | | ||
# make test-e2e-cov | ||
# - uses: actions/upload-artifact@v3 | ||
# if: env.GIT_DIFF | ||
# with: | ||
# name: "${{ github.sha }}-e2e-coverage" | ||
# path: ./tests/e2e-profile.out | ||
test-e2e: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
check-latest: true | ||
cache: true | ||
cache-dependency-path: go.sum | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
**/*.go | ||
go.mod | ||
go.sum | ||
**/go.mod | ||
**/go.sum | ||
**/Makefile | ||
Makefile | ||
- name: e2e tests | ||
if: env.GIT_DIFF | ||
run: | | ||
make test-e2e-cov | ||
- uses: actions/upload-artifact@v3 | ||
if: env.GIT_DIFF | ||
with: | ||
name: "${{ github.sha }}-e2e-coverage" | ||
path: ./tests/e2e-profile.out | ||
|
||
repo-analysis: | ||
runs-on: ubuntu-latest | ||
needs: [tests, test-integration, test-e2e] | ||
# needs: [tests, test-integration, test-e2e] | ||
needs: [tests, test-e2e] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: technote-space/[email protected] | ||
|
@@ -178,11 +179,11 @@ jobs: | |
# if: env.GIT_DIFF | ||
# with: | ||
# name: "${{ github.sha }}-integration-coverage" | ||
# - uses: actions/download-artifact@v3 | ||
# if: env.GIT_DIFF | ||
# with: | ||
# name: "${{ github.sha }}-e2e-coverage" | ||
# continue-on-error: true | ||
- uses: actions/download-artifact@v3 | ||
if: env.GIT_DIFF | ||
with: | ||
name: "${{ github.sha }}-e2e-coverage" | ||
continue-on-error: true | ||
- name: sonarcloud | ||
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }} | ||
uses: SonarSource/sonarcloud-github-action@master | ||
|
@@ -276,11 +277,6 @@ jobs: | |
run: | | ||
cd simapp | ||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... | ||
- name: tests simapp v1 | ||
if: env.GIT_DIFF | ||
run: | | ||
cd simapp | ||
go test -mod=readonly -timeout 30m -tags='app_v1 norace ledger test_ledger_mock rocksdb_build' ./... | ||
- name: sonarcloud | ||
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} | ||
uses: SonarSource/sonarcloud-github-action@master | ||
|
@@ -296,3 +292,34 @@ jobs: | |
|
||
# NOTE: The following jobs are used to test the Finschia SDK Go submodules present under x/{module}. | ||
# They run when there is a diff in their respective directories. | ||
|
||
test-x-foundation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.21" | ||
check-latest: true | ||
cache: true | ||
cache-dependency-path: x/foundation/go.sum | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
x/foundation/**/*.go | ||
x/foundation/go.mod | ||
x/foundation/go.sum | ||
- name: tests | ||
if: env.GIT_DIFF | ||
run: | | ||
cd x/foundation | ||
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./... | ||
- name: sonarcloud | ||
if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} | ||
uses: SonarSource/sonarcloud-github-action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
with: | ||
projectBaseDir: x/foundation/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.