Skip to content

Commit

Permalink
ci: run orm tests (#15885)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Apr 20, 2023
1 parent 99bbe51 commit b6812c1
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,36 @@ jobs:
with:
projectBaseDir: collections/

test-orm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.3
cache: true
cache-dependency-path: orm/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
orm/**/*.go
orm/go.mod
orm/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd orm
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: orm/

test-cosmovisor:
runs-on: ubuntu-latest
steps:
Expand Down
14 changes: 14 additions & 0 deletions orm/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sonar.projectKey=cosmos-sdk-orm
sonar.organization=cosmos

sonar.projectName=Cosmos SDK - ORM
sonar.project.monorepo.enabled=true

sonar.sources=.
sonar.exclusions=**/*_test.go
sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git

0 comments on commit b6812c1

Please sign in to comment.