diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f9a584f9b9..4c0e2f9288 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -697,6 +697,41 @@ jobs: with: projectBaseDir: store/ + test-store-v2: + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v4 + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + - uses: actions/setup-go@v5 + with: + go-version: "1.22" + check-latest: true + cache: true + cache-dependency-path: store/v2/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + store/v2/**/*.go + store/v2/go.mod + store/v2/go.sum + - name: test & coverage report creation + if: env.GIT_DIFF + run: | + cd store/v2 + nix develop .. -c go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb' ./... + - 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: store/v2/ + test-log: runs-on: ubuntu-latest steps: