diff --git a/.codecov.yml b/.codecov.yml
deleted file mode 100644
index 88f51441f92..00000000000
--- a/.codecov.yml
+++ /dev/null
@@ -1,57 +0,0 @@
-#
-# This codecov.yml is the default configuration for
-# all repositories on Codecov. You may adjust the settings
-# below in your own codecov.yml in your repository.
-#
-coverage:
- precision: 2
- round: down
- range: 70...100
-
- status:
- # Learn more at https://docs.codecov.io/docs/commit-status
- project:
- default:
- threshold: 1% # allow this much decrease on project
- app:
- target: 70%
- flags:
- - app
- modules:
- target: 70%
- flags:
- - modules
- client:
- flags:
- - client
- changes: false
-
-comment:
- layout: "reach, diff, files"
- behavior: default # update if exists else create new
- require_changes: true
-
-flags:
- app:
- paths:
- - "app/"
- - "baseapp/"
- modules:
- paths:
- - "core/"
- - "!modules/core/**/client/" # ignore client package
- client:
- paths:
- - "client/"
- - "core/**/client/"
-
-ignore:
- - "docs"
- - "*.md"
- - "**/*.pb.go"
- - "**/*.pb.gw.go"
- - "modules/**/**/**/*.pb.go"
- - "modules/**/**/**/*.pb.gw.go"
- - "modules/**/**/**/test_common.go"
- - "testing/"
- - "scripts/"
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index bedc75f1f52..77b4c150453 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -49,4 +49,4 @@ write a little note why.
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Provide a [commit message](https://github.com/cosmos/ibc-go/blob/main/docs/dev/pull-requests.md#commit-messages) to be used for the changelog entry in the PR description for review.
- [ ] Re-reviewed `Files changed` in the Github PR explorer.
-- [ ] Review `Codecov Report` in the comment section below once CI passes.
+- [ ] Review `SonarCloud Report` in the comment section below once CI passes.
diff --git a/.github/workflows/callbacks.yml b/.github/workflows/callbacks.yml
index 836edcc29fb..0bd4191a71f 100644
--- a/.github/workflows/callbacks.yml
+++ b/.github/workflows/callbacks.yml
@@ -48,3 +48,11 @@ jobs:
run: |
cd modules/apps/callbacks
go test -v -mod=readonly ./...
+ - 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: modules/apps/callbacks/
diff --git a/.github/workflows/capability.yml b/.github/workflows/capability.yml
index 89274a5c145..5a49d66d39a 100644
--- a/.github/workflows/capability.yml
+++ b/.github/workflows/capability.yml
@@ -34,3 +34,11 @@ jobs:
run: |
cd modules/capability
go test -v -mod=readonly ./...
+ - 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: modules/capability/
diff --git a/.github/workflows/e2e-wasm.yaml b/.github/workflows/e2e-wasm.yaml
index e75da52a156..3dc5a0e068a 100644
--- a/.github/workflows/e2e-wasm.yaml
+++ b/.github/workflows/e2e-wasm.yaml
@@ -49,19 +49,25 @@ jobs:
# we skip the job in this case.
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
needs: determine-image-tag # we are required to have a docker tag before we can build any images.
- uses: ./.github/workflows/e2e-test-workflow-call.yml
- # unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
- # provided to the workflow. This would cause privileged operations to fail.
- secrets: inherit
- with:
- # with each test, we build an image from the current code.
- build-and-push-docker-image-wasm: true
- # if the test fails, we upload logs so that we can download them from the UI.
- upload-logs: true
- chain-image: ghcr.io/cosmos/ibc-go-wasm-simd
- # with regular tests, both images are the same.
- chain-a-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
- chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
- chain-binary: 'simd'
- # only run the grandpa test suite for wasm tests.
- test-entry-point: 'TestGrandpaTestSuite'
+ steps:
+ - uses: ./.github/workflows/e2e-test-workflow-call.yml
+ # unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
+ # provided to the workflow. This would cause privileged operations to fail.
+ secrets: inherit
+ with:
+ # with each test, we build an image from the current code.
+ build-and-push-docker-image-wasm: true
+ # if the test fails, we upload logs so that we can download them from the UI.
+ upload-logs: true
+ chain-image: ghcr.io/cosmos/ibc-go-wasm-simd
+ # with regular tests, both images are the same.
+ chain-a-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
+ chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
+ chain-binary: 'simd'
+ # only run the grandpa test suite for wasm tests.
+ test-entry-point: 'TestGrandpaTestSuite'
+ - uses: actions/upload-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-e2e-wasm-coverage'
+ path: ./${{ matrix.part }}profile.out
diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml
index 7bea58b5913..d4ae4f763a1 100644
--- a/.github/workflows/e2e.yaml
+++ b/.github/workflows/e2e.yaml
@@ -48,19 +48,25 @@ jobs:
# we skip the job in this case.
if: ${{ !github.event.pull_request.draft && !github.event.pull_request.head.repo.fork && github.actor != 'dependabot[bot]' }}
needs: determine-image-tag # we are required to have a docker tag before we can build any images.
- uses: ./.github/workflows/e2e-test-workflow-call.yml
- # unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
- # provided to the workflow. This would cause privileged operations to fail.
- secrets: inherit
- with:
- # with each test, we build an image from the current code.
- build-and-push-docker-image: true
- # if the test fails, we upload logs so that we can download them from the UI.
- upload-logs: true
- chain-image: ghcr.io/cosmos/ibc-go-simd
- # with regular tests, both images are the same.
- chain-a-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
- chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
- chain-binary: 'simd'
- # on regular PRs we won't run upgrade tests.
- test-exclusions: 'TestUpgradeTestSuite,TestGrandpaTestSuite,TestIBCWasmUpgradeTestSuite'
+ steps:
+ - uses: ./.github/workflows/e2e-test-workflow-call.yml
+ # unless we explicitly tell the workflow to inherit secrets, required secrets such as GITHUB_TOKEN will not be
+ # provided to the workflow. This would cause privileged operations to fail.
+ secrets: inherit
+ with:
+ # with each test, we build an image from the current code.
+ build-and-push-docker-image: true
+ # if the test fails, we upload logs so that we can download them from the UI.
+ upload-logs: true
+ chain-image: ghcr.io/cosmos/ibc-go-simd
+ # with regular tests, both images are the same.
+ chain-a-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
+ chain-b-tag: '${{ needs.determine-image-tag.outputs.simd-tag }}'
+ chain-binary: 'simd'
+ # on regular PRs we won't run upgrade tests.
+ test-exclusions: 'TestUpgradeTestSuite,TestGrandpaTestSuite,TestIBCWasmUpgradeTestSuite'
+ - uses: actions/upload-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-e2e-coverage'
+ path: ./${{ matrix.part }}profile.out
diff --git a/.github/workflows/repo-analysis.yaml b/.github/workflows/repo-analysis.yaml
new file mode 100644
index 00000000000..7209d64058b
--- /dev/null
+++ b/.github/workflows/repo-analysis.yaml
@@ -0,0 +1,60 @@
+
+name: Repo analysis
+# Tests / Code Coverage workflow runs unit tests and uploads a code coverage report
+# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
+on:
+ workflow_run:
+ workflows: ["Tests / Code Coverage", "Tests / E2E", "Tests / E2E Wasm"]
+ branches: [main]
+ types:
+ - completed
+ pull_request:
+ push:
+ branches:
+ - main
+
+repo-analysis:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: technote-space/get-diff-action@v6.1.2
+ id: git_diff
+ with:
+ PATTERNS: |
+ **/*.go
+ go.mod
+ go.sum
+ **/go.mod
+ **/go.sum
+ - uses: actions/download-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-00-coverage'
+ - uses: actions/download-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-01-coverage'
+ - uses: actions/download-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-02-coverage'
+ - uses: actions/download-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-03-coverage'
+ - uses: actions/download-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-e2e-coverage'
+ continue-on-error: true
+ - uses: actions/download-artifact@v4
+ if: env.GIT_DIFF
+ with:
+ name: '${{ github.sha }}-e2e-wasm-coverage'
+ continue-on-error: true
+ - name: sonarcloud
+ if: ${{ env.GIT_DIFF && !github.event.pull_request.draft }}
+ uses: SonarSource/sonarcloud-github-action@master
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index da37c93fa73..b1fd4608bb0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -104,53 +104,7 @@ jobs:
cat pkgs.txt.part.${{ matrix.part }} | xargs go test -mod=readonly -timeout 30m -coverprofile=${{ matrix.part }}profile.out -covermode=atomic -tags='ledger test_ledger_mock'
if: env.GIT_DIFF
- uses: actions/upload-artifact@v4
+ if: env.GIT_DIFF
with:
name: '${{ github.sha }}-${{ matrix.part }}-coverage'
path: ./${{ matrix.part }}profile.out
-
- upload-coverage-report:
- runs-on: ubuntu-latest
- needs: tests
- steps:
- - uses: actions/checkout@v4
- - uses: technote-space/get-diff-action@v6.1.2
- with:
- PATTERNS: |
- **/**.go
- go.mod
- go.sum
- - uses: actions/download-artifact@v4
- with:
- name: '${{ github.sha }}-00-coverage'
- if: env.GIT_DIFF
- - uses: actions/download-artifact@v4
- with:
- name: '${{ github.sha }}-01-coverage'
- if: env.GIT_DIFF
- - uses: actions/download-artifact@v4
- with:
- name: '${{ github.sha }}-02-coverage'
- if: env.GIT_DIFF
- - uses: actions/download-artifact@v4
- with:
- name: '${{ github.sha }}-03-coverage'
- if: env.GIT_DIFF
- - run: |
- cat ./*profile.out | grep -v "mode: atomic" >> coverage.txt
- if: env.GIT_DIFF
- - name: filter out DONTCOVER
- run: |
- excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
- excludelist+=" $(find ./ -type f -name '*.pb.go')"
- excludelist+=" $(find ./ -type f -name '*.pb.gw.go')"
- excludelist+=" $(find ./ -type f -path './tests/mocks/*.go')"
- for filename in ${excludelist}; do
- filename=$(echo $filename | sed 's/^./github.com\/cosmos\/cosmos-sdk/g')
- echo "Excluding ${filename} from coverage report..."
- sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
- done
- if: env.GIT_DIFF
- - uses: codecov/codecov-action@v4
- with:
- file: ./coverage.txt
- if: env.GIT_DIFF
diff --git a/.github/workflows/wasm-client.yml b/.github/workflows/wasm-client.yml
index a2a3990ae3e..f1d73686398 100644
--- a/.github/workflows/wasm-client.yml
+++ b/.github/workflows/wasm-client.yml
@@ -55,3 +55,11 @@ jobs:
run: |
cd modules/light-clients/08-wasm
go test -v -mod=readonly ./...
+ - 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: modules/lightclients/08-wasm/
diff --git a/README.md b/README.md
index 6eb557c4653..0661d5a24f4 100644
--- a/README.md
+++ b/README.md
@@ -17,8 +17,8 @@
-
-
+
+