From 6befb100aaf8dc0f7f6ee205c8c81d307732f2ea Mon Sep 17 00:00:00 2001 From: "jaeseung.bae" Date: Fri, 22 Mar 2024 17:30:46 +0900 Subject: [PATCH] chore: add test job for bankplus --- .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54ff0dc876..53f647149a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -323,3 +323,34 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: projectBaseDir: x/foundation/ + + test-x-bankplus: + 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/bankplus/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + x/bankplus/**/*.go + x/bankplus/go.mod + x/bankplus/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd x/bankplus + 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/bankplus/