Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE1] try to fix coverage #1908

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,34 +169,11 @@ jobs:
run: |
make test

- name: Run go vet
run: |
make vet

- name: Generate coverage report
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
make test-cov

- name: Upload coverage report
if: ${{ matrix.platform == 'ubuntu-latest' }}
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: ./be1-go/coverage.out

- name: Build
if: ${{ always() }} # execute even if previous steps failed
run: |
make build

- name: Download coverage report
if: ${{ matrix.platform == 'ubuntu-latest' && steps.test-cov.outcome == 'success' }}
uses: actions/download-artifact@v3
with:
name: coverage-report
path: ./be1-go/

- name: Run SonarCloud analysis
if: ${{ matrix.platform == 'ubuntu-latest' && !startsWith(github.head_ref, 'dependabot/') }} # execute even if previous steps failed
uses: SonarSource/sonarcloud-github-action@master
Expand All @@ -206,11 +183,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_BE1 }}

- name: Cleanup coverage report
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: |
rm -f ./be1-go/coverage.out

fe2-android:
name: Fe2-Android
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion be1-go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test-no-cache: protocol
go test -v -race ./... -count=1

test-cov: protocol
go test -v -coverpkg=./internal/... -coverprofile=coverage.out ./internal/... ./cli/... -json > report.json
go test -v ./... -coverprofile=coverage.out -json > report.json

vet: protocol
go vet ./...
Expand Down
2 changes: 1 addition & 1 deletion be1-go/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ sonar.go.coverage.reportPaths=./coverage.out

# Path patterns of the source files
sonar.sources=.
sonar.exclusions=**/*_test.go,**/test/**, **/mock/**, **/old/**
sonar.exclusions=**/*_test.go,**/test/**, **/mock/**, **/old/**, **/docs/**, **/docsutils/**

# Path patterns of the test files
sonar.tests=.
Expand Down
Loading