ci: store-v2 test CI/CD (#20818)

This commit is contained in:
cool-developer 2024-06-29 09:25:59 -04:00 committed by GitHub
parent d426a5db67
commit db09ef5120
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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: