refactor(lockup account): Add tests for lockup account (#19772)

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Marko <marko@baricevic.me>
This commit is contained in:
son trinh
2024-04-24 06:54:38 +00:00
committed by GitHub
co-authored by coderabbitai[bot] Marko
parent 2dd8ab750d
commit 11d4e74970
62 changed files with 1904 additions and 784 deletions
+31
View File
@@ -700,6 +700,37 @@ jobs:
with:
projectBaseDir: x/accounts/
test-x-accounts-lockup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
cache: true
cache-dependency-path: x/accounts/defaults/lockup/go.sum
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
x/accounts/defaults/lockup/**/*.go
x/accounts/defaults/lockup/go.mod
x/accounts/defaults/lockup/go.sum
- name: tests
if: env.GIT_DIFF
run: |
cd x/accounts/defaults/lockup
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock' ./...
- 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/accounts/defaults/lockup/
test-x-tx:
runs-on: ubuntu-latest
steps: