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

Add code quality & coverage scanner #10

Merged
merged 1 commit into from
Mar 3, 2025
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
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ permissions:
contents: read
pull-requests: write
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
Expand All @@ -24,4 +29,11 @@ jobs:
run: go build ./...

- name: Test
run: go test ./...
run: go test -json -cover -coverprofile=coverage.out -covermode=atomic -v ./... > report.json

- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v5.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}

8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@

# go-xmldsig
XML Digital Signature

[![Build & Test](https://github.com/deb-ict/go-xmldsig/actions/workflows/build.yml/badge.svg)](https://github.com/deb-ict/go-xmldsig/actions/workflows/build.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=deb-ict_go-xmldsig&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=deb-ict_go-xmldsig)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=deb-ict_go-xmldsig&metric=coverage)](https://sonarcloud.io/summary/new_code?id=deb-ict_go-xmldsig)

XML digital signature

## Installation
Install `go-xmldsig` using `go get`:
Expand Down
14 changes: 14 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sonar.projectKey=deb-ict_go-xmldsig
sonar.organization=deb-ict

sonar.projectName=go-xmldsig
sonar.projectVersion=1.0.0

sonar.sources=.
sonar.exclusions=**/*_test.go,**/vendor/**,**/node_modules/**

sonar.tests=.
sonar.test.inclusions=**/*_test.go
sonar.test.exclusions=**/vendor/**
sonar.go.coverage.reportPaths=coverage.out
sonar.go.tests.reportPaths=report.json
Loading